happiness (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) happiness

Steamのウィッシュリストを99%エクスポートする方法

方法

  1. 自分のウィッシュリストを開く
  2. https://store.steampowered.com/wishlist/
  3. 右クリック「要素を検証」などでデベロッパーツールを開く
  4. 下記のscriptを「console」にペーストし、Enterキー押す
  5. すると20件くらい取得できる
  6. スクロールして再度このscriptを実行すると、さらに取得できる
  7. tsvで出力するので、google spreadsheetなどに貼り付けられる形式になっている。適当csvなどにに改変するとよい
 Function to extract game details from a wishlist row
function extractGameDetails(row) {
    const title = row.querySelector('.title').textContent.trim();
    const imageSrc = row.querySelector('.capsule img').getAttribute('data-img-src');
    const tags = Array.from(row.querySelectorAll('.tags .tag')).map(tag => tag.textContent.trim()).join(', ');
    const gameLink = row.querySelector('.title').getAttribute('href');
    const gameURL = `https://store.steampowered.com${gameLink}`;
    return [title, imageSrc, tags, gameURL];
}

// Extract game details from each wishlist row
const wishlistRows = document.querySelectorAll('.wishlist_row');
const gameDetails = Array.from(wishlistRows).map(row => extractGameDetails(row));

// Convert game details to TSV format
const tsvData = gameDetails.map(details => details.join('\t')).join('\n');

console.log('Title\tImage URL\tTags\tGame Site URL');
console.log(tsvData);