mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-05 02:55:25 +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 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
|
||||
|
||||
|
@ -13,3 +13,4 @@ pycryptodomex
|
||||
ua-generator
|
||||
qbittorrent-api
|
||||
pyTelegramBotAPI
|
||||
cloudscraper
|
Loading…
x
Reference in New Issue
Block a user