Created
September 1, 2022 15:55
-
-
Save SuperSonicHub1/6f109a01360260b89e379827fc61aa7f to your computer and use it in GitHub Desktop.
Scrape Metacritic scores for video games using metacritic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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