Skip to content

Commit

Permalink
Create scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
walinchus committed Jun 14, 2017
1 parent be98037 commit 6f04329
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions scraper.py
Expand Up @@ -94,10 +94,7 @@ def scrape_table(root):
62 scrape_page(next_link)'''

#def Add_Case_No(next_link):
for next_link in range (0,744):
print next_link + 1
print "the next case number is:", next_link
next_link = 'GetCaseInformation.aspx?db=garfield&number=CF-2011-' + str(next_link)


def scrape_and_look_for_next_link(url):
html = scraperwiki.scrape(url)
Expand All @@ -106,10 +103,14 @@ def scrape_and_look_for_next_link(url):
scrape_table(root)
#for next_link in range (1, 744):
#print next_link
if next_link:
next_url = base_url+str(next_link)
print next_url
scrape_and_look_for_next_link(next_url)
for next_link in range (0,744):
print next_link + 1
print "the next case number is:", next_link
next_link = 'GetCaseInformation.aspx?db=garfield&number=CF-2011-' + str(next_link)
if next_link:
next_url = base_url+str(next_link)
print next_url
scrape_and_look_for_next_link(next_url)

# ---------------------------------------------------------------------------
# START HERE: define your starting URL - then
Expand Down

0 comments on commit 6f04329

Please sign in to comment.