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 d262ea4 commit 929017d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scraper.py
Expand Up @@ -20,14 +20,8 @@
urls.pop(0)
newrls=[e.get("href") for e in root1.cssselect("a")]
urls=urls+newrls
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
print(str(len(newrls)))
print(root1.cssselect("div[class='blog-col']")
else:pass


Expand Down

0 comments on commit 929017d

Please sign in to comment.