mirror of
https://github.com/simon987/od-database.git
synced 2025-04-20 02:46:45 +00:00
Ignore 'parent directory' links
This commit is contained in:
parent
8f311e52ee
commit
8486555426
@ -177,7 +177,7 @@ class HttpDirectory(RemoteDirectory):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _should_ignore(base_url, link: Anchor):
|
def _should_ignore(base_url, link: Anchor):
|
||||||
if link.text == "../" or link.href.endswith(HttpDirectory.BLACK_LIST):
|
if link.text == "../" or link.href == "../" or link.href.endswith(HttpDirectory.BLACK_LIST):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Ignore external links
|
# Ignore external links
|
||||||
|
Loading…
x
Reference in New Issue
Block a user