Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rabimba committed Jun 17, 2014
1 parent aaf949b commit 85ac7e5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions scraper.py
Expand Up @@ -27,13 +27,4 @@ def scrape_laptop(url):
while True:
data = scraperwiki.scrape('http://www.flipkart.com/computers/laptops/all?response-type=json&inf-start=%d' % start)
if data['count'] <= 0:
break
tree = lxml.html.fromstring(data['html'])
for link in tree.findall('.//a[@class="prd-img"]'):
url = link.get('href', '')
if not url:
continue
parsed_url = urlparse.urlparse(url)
print parsed_url.path
scrape_laptop('http://www.flipkart.com' + parsed_url.path)
start += 20
print data;

0 comments on commit 85ac7e5

Please sign in to comment.