From 8a92285eef0a329c638f09a17e5bda7f10683f60 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Wed, 21 Aug 2024 11:31:48 +0300 Subject: [PATCH] Improving piped --- services/youtube.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/youtube.py b/services/youtube.py index 0da71d7..0f2db01 100644 --- a/services/youtube.py +++ b/services/youtube.py @@ -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")