Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scrapy.selector import Selector
- from scrapy.http import HtmlResponse
- response = HtmlResponse(url='https://en.wikipedia.org/wiki/Pan_American_Games')
- datas = Selector(response=response).xpath('//div[@class="thumb tleft"]')
- from urllib2 import urlopen
- from lxml import html
- response = urlopen('https://en.wikipedia.org/wiki/Pan_American_Games')
- page = html.fromstring(response.read())
- datas = page.xpath('//div[@class="thumb tleft"]')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement