1111
1212# Internal utilities
1313from StreamingCommunity .Util .os import os_manager
14- from StreamingCommunity .Util .headers import get_headers
15- from StreamingCommunity .Util .http_client import create_client
14+ from StreamingCommunity .Util .http_client import create_client , get_headers
1615from StreamingCommunity .Util .message import start_message
1716from StreamingCommunity .Util .config_json import config_manager
1817from StreamingCommunity .Lib .HLS import HLS_Downloader
1918
2019
2120# Logic class
22- from StreamingCommunity .Api .Template .config_loader import site_constant
23- from StreamingCommunity .Api .Template .object import MediaItem
21+ from StreamingCommunity .Api .Template import site_constants , MediaItem
2422from StreamingCommunity .Api .Player .supervideo import VideoSource
2523
2624
@@ -40,7 +38,7 @@ def download_film(select_title: MediaItem) -> str:
4038 - str: output path if successful, otherwise None
4139 """
4240 start_message ()
43- console .print (f"\n [yellow]Download: [red]{ site_constant .SITE_NAME } → [cyan]{ select_title .name } \n " )
41+ console .print (f"\n [yellow]Download: [red]{ site_constants .SITE_NAME } → [cyan]{ select_title .name } \n " )
4442
4543 # Extract mostraguarda URL
4644 try :
@@ -52,7 +50,7 @@ def download_film(select_title: MediaItem) -> str:
5250 mostraguarda = iframes [0 ]['src' ]
5351
5452 except Exception as e :
55- console .print (f"[red]Site: { site_constant .SITE_NAME } , request error: { e } , get mostraguarda" )
53+ console .print (f"[red]Site: { site_constants .SITE_NAME } , request error: { e } , get mostraguarda" )
5654 return None
5755
5856 # Extract supervideo URL
@@ -67,7 +65,7 @@ def download_film(select_title: MediaItem) -> str:
6765 supervideo_url = 'https:' + supervideo_match .group (0 )
6866
6967 except Exception as e :
70- console .print (f"[red]Site: { site_constant .SITE_NAME } , request error: { e } , get supervideo URL" )
68+ console .print (f"[red]Site: { site_constants .SITE_NAME } , request error: { e } , get supervideo URL" )
7169 console .print ("[yellow]This content will be available soon!" )
7270 return None
7371
@@ -77,7 +75,7 @@ def download_film(select_title: MediaItem) -> str:
7775
7876 # Define the filename and path for the downloaded film
7977 title_name = os_manager .get_sanitize_file (select_title .name , select_title .date ) + extension_output
80- mp4_path = os .path .join (site_constant .MOVIE_FOLDER , title_name .replace (extension_output , "" ))
78+ mp4_path = os .path .join (site_constants .MOVIE_FOLDER , title_name .replace (extension_output , "" ))
8179
8280 # Download the film using the m3u8 playlist, and output filename
8381 hls_process = HLS_Downloader (
0 commit comments