diff --git a/README.md b/README.md index 40aae9d..4db384b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It can be installed by pip. $> pip install -r requirements.txt # Run - $> python vgchartzfull.py + $> python vgchartz-full-crawler.py ``` diff --git a/vgchartz-full-crawler.py b/vgchartz-full-crawler.py index 7c6c30c..2aad95b 100644 --- a/vgchartz-full-crawler.py +++ b/vgchartz-full-crawler.py @@ -186,11 +186,11 @@ def download_data(*, start_page, end_page, include_genre): # We locate the game through search tags with game urls in the main table game_tags = list(filter( - lambda x: x.attrs['href'].startswith('https://www.vgchartz.com/game/'), + lambda x: 'href' in x.attrs and x.attrs['href'].startswith('https://www.vgchartz.com/game/'), # discard the first 10 elements because those # links are in the navigation bar soup.find_all("a") - ))[10:] + )) for tag in game_tags: