diff --git a/StreamingCommunity/Api/Player/supervideo.py b/StreamingCommunity/Api/Player/supervideo.py index 93062eb..aa0754b 100644 --- a/StreamingCommunity/Api/Player/supervideo.py +++ b/StreamingCommunity/Api/Player/supervideo.py @@ -8,6 +8,7 @@ import logging import httpx import jsbeautifier from bs4 import BeautifulSoup +import cloudscraper # Internal utilities @@ -42,7 +43,8 @@ class VideoSource: - str: The response content if successful, None otherwise. """ 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() return response.text diff --git a/requirements.txt b/requirements.txt index 3790b61..a364658 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,3 +13,4 @@ pycryptodomex ua-generator qbittorrent-api pyTelegramBotAPI +cloudscraper \ No newline at end of file