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 f6a5cc7 commit a9dca98
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scraper.py
Expand Up @@ -22,14 +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
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 a9dca98

Please sign in to comment.