| #!/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