Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
baradwaaj committed Apr 23, 2015
1 parent dc38dcd commit db2d3cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import urllib2
import sys

link = 'http://www.flipkart.com/mobiles/pr?p[]=sort%3Dprice_asc&sid=tyy%2C4io&layout=grid'
item_count = 600
for i in range(0, item_count, 40):
link = "http://www.flipkart.com/mobiles/pr?p%5B%5D=sort%3Dprice_asc&sid=tyy%2C4io&layout=grid&ajax=true&start=%d" % (i+1)

// Do something with the link
print link
response = urllib2.urlopen(link)
thePage = response.read()
soup = bs4.BeautifulSoup(thePage)
Expand Down

0 comments on commit db2d3cd

Please sign in to comment.