by awsedwsq · 14y ago · 0 comments
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
# 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]