Last active
December 10, 2015 02:38
-
-
Save dz0ny/4369574 to your computer and use it in GitHub Desktop.
This file contains 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/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() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment