Skip to content

Instantly share code, notes, and snippets.

@SuperSonicHub1
Created September 1, 2022 15:55
Show Gist options
  • Save SuperSonicHub1/6f109a01360260b89e379827fc61aa7f to your computer and use it in GitHub Desktop.
Save SuperSonicHub1/6f109a01360260b89e379827fc61aa7f to your computer and use it in GitHub Desktop.
Scrape Metacritic scores for video games using metacritic
#!/usr/bin/env bash
download-pages() {
local SYSTEM="$1"
wget \
--recursive \
--no-clobber \
--domains www.metacritic.com \
--no-parent \
--wait=2 \
--random-wait \
--tries=3 \
--accept-regex "detailed" \
--reject-regex "condensed|num_items|$SYSTEM$" \
--include "/browse/games/title/$SYSTEM" \
--directory-prefix=data/ \
"https://www.metacritic.com/browse/games/title/$SYSTEM?view=detailed&page=0"
}
while read system
do
download-pages "$system"
done < systems.txt
pc
stadia
gamecube
wii
wii-u
switch
gba
ds
3ds
ps1
ps2
ps3
ps4
ps5
psp
vita
xbox
xbox360
xboxone
xbox-series-x
dreamcast
ios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment