Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
meandu229 committed May 17, 2016
1 parent ea45976 commit d530cf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
frame = root.cssselect("div.entry-content")[0]
url = frame.cssselect('img')[0].get('src')
print url
ret = scraperwiki.sql.select("* from data where 'url'='"+url+"'")
ret = scraperwiki.sql.select("* from data where 'url'='"+str(url)+"'")
print str(ret.len)
#
# # Write out to the sqlite database using scraperwiki library
scraperwiki.sqlite.save(unique_keys=['url'], data={"url": url})
scraperwiki.sqlite.save(unique_keys=['url'], data={"url": str(url)})
#
# # An arbitrary query against the database
# scraperwiki.sql.select("* from data where 'name'='peter'")
Expand Down

0 comments on commit d530cf3

Please sign in to comment.