Add error proxy

This commit is contained in:
Lovi 2025-05-17 09:51:09 +02:00
parent 8c642102ed
commit 82e2348ba8
4 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,7 @@ from .series import download_series
# Variable
indice = 0
_useFor = "Film_&_Serie"
_priority = 1
_priority = 0
_engineDownload = "hls"
_deprecate = False

View File

@ -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

View File

@ -21,7 +21,7 @@ from .series import download_series
# Variable
indice = 7
_useFor = "Film_&_Serie"
_priority = 1
_priority = 0
_engineDownload = "hls"
_deprecate = False

View File

@ -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