From 82e2348ba8f4861df0cc56de14f99ac04604039d Mon Sep 17 00:00:00 2001 From: Lovi <62809003+Arrowar@users.noreply.github.com> Date: Sat, 17 May 2025 09:51:09 +0200 Subject: [PATCH] Add error proxy --- StreamingCommunity/Api/Site/streamingcommunity/__init__.py | 2 +- StreamingCommunity/Api/Site/streamingcommunity/site.py | 1 + StreamingCommunity/Api/Site/streamingwatch/__init__.py | 2 +- StreamingCommunity/Api/Site/streamingwatch/site.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/StreamingCommunity/Api/Site/streamingcommunity/__init__.py b/StreamingCommunity/Api/Site/streamingcommunity/__init__.py index b286e74..ca47530 100644 --- a/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +++ b/StreamingCommunity/Api/Site/streamingcommunity/__init__.py @@ -27,7 +27,7 @@ from .series import download_series # Variable indice = 0 _useFor = "Film_&_Serie" -_priority = 1 +_priority = 0 _engineDownload = "hls" _deprecate = False diff --git a/StreamingCommunity/Api/Site/streamingcommunity/site.py b/StreamingCommunity/Api/Site/streamingcommunity/site.py index a99971f..f42631d 100644 --- a/StreamingCommunity/Api/Site/streamingcommunity/site.py +++ b/StreamingCommunity/Api/Site/streamingcommunity/site.py @@ -57,6 +57,7 @@ def title_search(query: str, proxy: str) -> int: version = json.loads(soup.find('div', {'id': "app"}).get("data-page"))['version'] except Exception as e: + if "WinError" in str(e) or "Errno" in str(e): console.print("\n[bold yellow]Please make sure you have enabled and configured a valid proxy.[/bold yellow]") console.print(f"[red]Site: {site_constant.SITE_NAME} version, request error: {e}") return 0 diff --git a/StreamingCommunity/Api/Site/streamingwatch/__init__.py b/StreamingCommunity/Api/Site/streamingwatch/__init__.py index 049af54..fbf7cf4 100644 --- a/StreamingCommunity/Api/Site/streamingwatch/__init__.py +++ b/StreamingCommunity/Api/Site/streamingwatch/__init__.py @@ -21,7 +21,7 @@ from .series import download_series # Variable indice = 7 _useFor = "Film_&_Serie" -_priority = 1 +_priority = 0 _engineDownload = "hls" _deprecate = False diff --git a/StreamingCommunity/Api/Site/streamingwatch/site.py b/StreamingCommunity/Api/Site/streamingwatch/site.py index 82f86c4..1b284d1 100644 --- a/StreamingCommunity/Api/Site/streamingwatch/site.py +++ b/StreamingCommunity/Api/Site/streamingwatch/site.py @@ -88,6 +88,7 @@ def title_search(query: str, proxy: str) -> int: soup = BeautifulSoup(response.text, 'html.parser') except Exception as e: + if "WinError" in str(e) or "Errno" in str(e): console.print("\n[bold yellow]Please make sure you have enabled and configured a valid proxy.[/bold yellow]") console.print(f"[red]Site: {site_constant.SITE_NAME}, request search error: {e}") return 0