Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
ostephens committed May 13, 2016
1 parent 5b34e34 commit b81179e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scraper.py
Expand Up @@ -31,7 +31,7 @@ def tracker_exists(url):
return count > 0

def get_urlist_az(path,selector) :
print "Scraping a-z for URLs"
print "Scraping a-z " + path + " for URLs"
#For a-z - 97, 122
for i in range(97, 122):
page = "http://www.bbc.co.uk/food/"+path+"/by/letters/" + chr(i)
Expand Down Expand Up @@ -100,9 +100,8 @@ def results_list(url):
results_list(next_url)
#print "returning..."
return True
#temporary line to get rid of unwanted table
scraperwiki.sqlite.execute("drop table errors")
#Make sure tables exit

#Make sure tables exist
tracker_model = { "url" : "http://test.org","status" : "", "time" : time.time() }
scraperwiki.sqlite.save(unique_keys=["url"], table_name="tracker", data=tracker_model)
scraperwiki.sqlite.execute("delete from tracker where url = \"http://test.org\"")
Expand Down

0 comments on commit b81179e

Please sign in to comment.