Code Documentation (Auto generated)

parseMetacritics.get_gamesdata(link, headers, title_class, metascore_class)

Retrive Game Title and Score

Using a parsed URL it finds the title(s) and game score

Parameters:
  • title_class – The HTML class where the title can be found
  • metascore_class – HTML where is the game metascore
Returns:

JSON with the Games/Scores

parseMetacritics.main(argv)

MAIN

Main program function which calls the other functions

Parameters:argv – Arguments passed via command line
Returns:JSON with the Games/Scores
parseMetacritics.parse_url(link, headers)

Parse Metacritics URLs

Get a URL and parse the html using BeautifulSoup module

Parameters:
  • link – The URL for Metacritics Top Games (By Metascore)
  • headers – Default HTTP header
Returns:

The URL parsed

parseMetacritics.rest_api(link, headers, title_class, metascore_class, payload)

REST API

Exposed method to get PS3 Game title and score

Parameters:payload – Can be /games or /games/title_of_game
Returns:JSON with the Games/Scores