Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzalot committed Aug 14, 2016
1 parent 1a77e1d commit e95d485
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scraper.py
Expand Up @@ -53,10 +53,10 @@ def parse_best_seller_page(self, response):
bs_list = response.xpath("//*[@id='main']/div[1]/section[1]/ol/li/article")
number = 1
for entry in bs_list:
title = response.xpath(".//[@class='title']/text()").extract()
author = response.xpath(".//[@class='author']/text()").extract()
publisher = response.xpath(".//[@class='publisher']/text()").extract()
description = response.xpath(".//[@class='description']/text()").extract()
title = response.xpath(".//h3[contains(@class, 'title')]/text()").extract()
author = response.xpath(".//p[contains(@class, 'author']/text()").extract()
publisher = response.xpath(".//p[contains(@class, 'publisher']/text()").extract()
description = response.xpath(".//p[contains(@class, 'description']/text()").extract()
isbn = response.xpath(".//meta/@content").extract()
print "label,number,title[0],author[0],publisher[0],description[0],isbn[1],isbn[0]"
number+=1
Expand Down

0 comments on commit e95d485

Please sign in to comment.