mirror of https://github.com/Askill/optar.git
merged 2 if statements in crawler
This commit is contained in:
parent
32e10d2665
commit
2339d78ad7
|
|
@ -71,12 +71,10 @@ class Crawler:
|
|||
|
||||
n_links = []
|
||||
for link in _links:
|
||||
if link not in n_links:
|
||||
if link not in n_links and level < limit:
|
||||
if link.startswith("http"):
|
||||
if level < limit:
|
||||
n_links.append((level+1, link))
|
||||
else:
|
||||
if level < limit:
|
||||
n_links.append((level+1, urljoin(site.url, link)))
|
||||
|
||||
unchecked += n_links
|
||||
|
|
|
|||
Loading…
Reference in New Issue