Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hicham20201441 committed Aug 27, 2020
1 parent 929017d commit f6a5cc7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scraper.py
Expand Up @@ -22,6 +22,14 @@
urls=urls+newrls
print(str(len(newrls)))
print(root1.cssselect("div[class='blog-col']")
try:
if root1.cssselect("div[class='blog-col']"):
scraperwiki.sqlite.save(unique_keys=[ur], data={"link": ur, "blog":root1.cssselect("div[class='blog-col']") })
print("got a blog!")
else:
print("no article for this link")
pass
except:pass
else:pass


Expand Down

0 comments on commit f6a5cc7

Please sign in to comment.