mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-05 02:55:25 +00:00
Add error proxy
This commit is contained in:
parent
8c642102ed
commit
82e2348ba8
@ -27,7 +27,7 @@ from .series import download_series
|
||||
# Variable
|
||||
indice = 0
|
||||
_useFor = "Film_&_Serie"
|
||||
_priority = 1
|
||||
_priority = 0
|
||||
_engineDownload = "hls"
|
||||
_deprecate = False
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -21,7 +21,7 @@ from .series import download_series
|
||||
# Variable
|
||||
indice = 7
|
||||
_useFor = "Film_&_Serie"
|
||||
_priority = 1
|
||||
_priority = 0
|
||||
_engineDownload = "hls"
|
||||
_deprecate = False
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user