mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 11:35:29 +00:00
added clopudflare support on supervideo
This commit is contained in:
parent
86c7293779
commit
7d72761bc5
@ -8,6 +8,7 @@ import logging
|
|||||||
import httpx
|
import httpx
|
||||||
import jsbeautifier
|
import jsbeautifier
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
import cloudscraper
|
||||||
|
|
||||||
|
|
||||||
# Internal utilities
|
# Internal utilities
|
||||||
@ -42,7 +43,8 @@ class VideoSource:
|
|||||||
- str: The response content if successful, None otherwise.
|
- str: The response content if successful, None otherwise.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
response = self.client.get(url, headers=self.headers, timeout=MAX_TIMEOUT, follow_redirects=True)
|
cloudflare = cloudscraper.create_scraper()
|
||||||
|
response = cloudflare.get(url=url)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
return response.text
|
return response.text
|
||||||
|
|
||||||
|
@ -13,3 +13,4 @@ pycryptodomex
|
|||||||
ua-generator
|
ua-generator
|
||||||
qbittorrent-api
|
qbittorrent-api
|
||||||
pyTelegramBotAPI
|
pyTelegramBotAPI
|
||||||
|
cloudscraper
|
Loading…
x
Reference in New Issue
Block a user