Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zegor committed Jul 14, 2018
1 parent 82e5c0e commit dfc85f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scraper.py
Expand Up @@ -5,7 +5,11 @@
import lxml.html

# Clear database data table
scraperwiki.sqlite.execute("DROP TABLE 'data'")
try:
scraperwiki.sqlite.execute("DROP TABLE 'data'")
print("Table 'data' dropped.")
except:
print("Table 'data' does not exist.")

# Scrape source
html = scraperwiki.scrape("http://www.espn.com/nhl/statistics")
Expand Down

0 comments on commit dfc85f6

Please sign in to comment.