This commit is contained in:
2025-10-22 15:54:36 +02:00
parent 92795cf9b3
commit 6db850c2ad
13 changed files with 330 additions and 338 deletions

View File

@@ -1,9 +1,8 @@
import re
import requests
from bs4 import BeautifulSoup
from aniworld.config import DEFAULT_REQUEST_TIMEOUT, RANDOM_USER_AGENT
from bs4 import BeautifulSoup
def get_direct_link_from_vidmoly(embeded_vidmoly_link: str):
@@ -16,6 +15,8 @@ def get_direct_link_from_vidmoly(embeded_vidmoly_link: str):
soup = BeautifulSoup(html_content, 'html.parser')
scripts = soup.find_all('script')
# Match the ``file:"<url>"`` assignment inside the obfuscated player
# script so we can recover the direct MP4 source URL.
file_link_pattern = r'file:\s*"(https?://.*?)"'
for script in scripts: