3 ms·
Scrapy, what a fantastic framework it is! One thing bothers me with your code tough, the following could be replace with built in Scrapy-tools. Edit: The code
by awsedwsq 15y ago
Scrapy, what a fantastic framework it is!
One thing bothers me with your code tough, the following could be replace with built in Scrapy-tools.
Edit:
The code got wrongly formatted in here, check it out on PasteBin
http://pastebin.com/2QzWgWxN http://pastebin.com/2QzWgWxN
- d0mine 15y agoPrefix the code with spaces to format it: # Without using BeautifulSoup. for item in hxs.select('//td[@class="title"]/a'): news_item = NewsItem() news_item['title'] = item.select('text()').extract()[0] news_item['url'] = item.select('@href').extract()[0]