mirror of
https://github.com/libredirect/instances.git
synced 2024-12-06 19:26:17 +01:00
Improving piped
This commit is contained in:
+7
-1
@@ -48,13 +48,19 @@ def piped(mightyList):
|
||||
r' \| (https:\/{2}(?:[^\s\/]+\.)+[a-zA-Z]+) \| ', r.text)
|
||||
for item in tmp:
|
||||
try:
|
||||
print(
|
||||
Fore.GREEN + 'Fetching ' + Style.RESET_ALL + item,
|
||||
end=' '
|
||||
)
|
||||
url = requests.get(item, timeout=5).url
|
||||
if url.strip("/") == item:
|
||||
print(Fore.RED + '𐄂')
|
||||
continue
|
||||
else:
|
||||
print(Fore.GREEN + '✓')
|
||||
_list['clearnet'].append(url)
|
||||
except Exception:
|
||||
logging.error(traceback.format_exc())
|
||||
print(Fore.RED + '𐄂')
|
||||
continue
|
||||
mightyList[frontend] = _list
|
||||
_list['clearnet'].remove("https://piped.video")
|
||||
|
||||
Reference in New Issue
Block a user