File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44from typing import DefaultDict
55import requests
66from urllib .parse import urlparse , urlunparse
7- import rich
7+ # import rich
88
99# you can check dns for eligible links
1010
3636def detect_loop_url (url : str ):
3737 ret = False
3838 url_len = len (url )
39- if url_len % 2 == 0 :
40- # even length
41- left , right = url [: url_len / 2 ], url [url_len / 2 :]
42- ret = left == right
39+ if url :
40+ if url_len % 2 == 0 :
41+ # even length
42+ left , right = url [: url_len // 2 ], url [url_len // 2 :]
43+ ret = left == right
4344 return ret
4445
4546
@@ -216,7 +217,7 @@ def filter_unwanted_hosts_from_urls(urls: list[str]) -> list[str]:
216217 return ret
217218
218219
219- def collect_all_urls_from_database (app : EmbedApp ) -> list [str ]:
220+ def collect_all_urls_from_database () -> list [str ]:
220221 ret = []
221222 app = EmbedApp ()
222223
You can’t perform that action at this time.
0 commit comments