Skip to content

Instantly share code, notes, and snippets.

@dz0ny
Last active December 10, 2015 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dz0ny/4369574 to your computer and use it in GitHub Desktop.
Save dz0ny/4369574 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import requests
from pyquery import PyQuery
urls = ['http://www.metacritic.com/game/playstation-3/black-knight-sword',
'http://www.metacritic.com/game/pc/far-cry-3']
for url in urls:
print 'Igra:', url
req = requests.get(url)
if req.status_code is 200:
stran = PyQuery(req.text)
print 'MetaScore:', stran.find('.data.metascore span.score_value').text()
print 'User score:', stran.find('.data.avguserscore.avguserscore_favorable .score_value').text()
print 'Developer:', stran.find('li.summary_detail.developer span.data').text()
print 'Žanr:', stran.find('li.summary_detail.product_genre span.data').text()
print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment