StreamingCommunity 3.3.7__py3-none-any.whl → 3.3.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of StreamingCommunity might be problematic. Click here for more details.
- StreamingCommunity/Api/Player/supervideo.py +1 -1
- StreamingCommunity/Api/Site/animeunity/serie.py +1 -1
- StreamingCommunity/Api/Site/animeworld/serie.py +1 -1
- StreamingCommunity/Api/Site/crunchyroll/film.py +13 -3
- StreamingCommunity/Api/Site/crunchyroll/series.py +6 -6
- StreamingCommunity/Api/Site/crunchyroll/site.py +13 -8
- StreamingCommunity/Api/Site/crunchyroll/util/ScrapeSerie.py +16 -41
- StreamingCommunity/Api/Site/crunchyroll/util/get_license.py +107 -101
- StreamingCommunity/Api/Site/mediasetinfinity/util/get_license.py +1 -1
- StreamingCommunity/Api/Site/raiplay/series.py +1 -10
- StreamingCommunity/Api/Site/raiplay/site.py +5 -13
- StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +12 -12
- StreamingCommunity/Api/Template/loader.py +13 -4
- StreamingCommunity/Lib/Downloader/DASH/cdm_helpher.py +8 -3
- StreamingCommunity/Lib/Downloader/DASH/decrypt.py +1 -0
- StreamingCommunity/Lib/Downloader/DASH/downloader.py +9 -2
- StreamingCommunity/Lib/Downloader/DASH/parser.py +456 -98
- StreamingCommunity/Lib/Downloader/DASH/segments.py +109 -64
- StreamingCommunity/Lib/Downloader/HLS/segments.py +261 -355
- StreamingCommunity/Lib/Downloader/MP4/downloader.py +1 -1
- StreamingCommunity/Lib/FFmpeg/command.py +3 -3
- StreamingCommunity/Lib/M3U8/estimator.py +0 -1
- StreamingCommunity/Upload/version.py +1 -1
- StreamingCommunity/Util/config_json.py +0 -3
- {streamingcommunity-3.3.7.dist-info → streamingcommunity-3.3.9.dist-info}/METADATA +1 -3
- {streamingcommunity-3.3.7.dist-info → streamingcommunity-3.3.9.dist-info}/RECORD +30 -30
- {streamingcommunity-3.3.7.dist-info → streamingcommunity-3.3.9.dist-info}/WHEEL +0 -0
- {streamingcommunity-3.3.7.dist-info → streamingcommunity-3.3.9.dist-info}/entry_points.txt +0 -0
- {streamingcommunity-3.3.7.dist-info → streamingcommunity-3.3.9.dist-info}/licenses/LICENSE +0 -0
- {streamingcommunity-3.3.7.dist-info → streamingcommunity-3.3.9.dist-info}/top_level.txt +0 -0
|
@@ -105,10 +105,17 @@ def load_search_functions() -> Dict[str, LazySearchModule]:
|
|
|
105
105
|
loaded_functions = {}
|
|
106
106
|
|
|
107
107
|
# Determine base path (calculated once)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
if getattr(sys, 'frozen', False):
|
|
109
|
+
|
|
110
|
+
# When frozen (exe), sys._MEIPASS points to temporary extraction directory
|
|
111
|
+
base_path = os.path.join(sys._MEIPASS, "StreamingCommunity")
|
|
112
|
+
api_dir = os.path.join(base_path, 'Api', 'Site')
|
|
113
|
+
|
|
114
|
+
else:
|
|
115
|
+
# When not frozen, __file__ is in StreamingCommunity/Api/Template/loader.py
|
|
116
|
+
# Go up two levels to get to StreamingCommunity/Api
|
|
117
|
+
base_path = os.path.dirname(os.path.dirname(__file__))
|
|
118
|
+
api_dir = os.path.join(base_path, 'Site')
|
|
112
119
|
|
|
113
120
|
# Quick scan: just read directory structure and module metadata
|
|
114
121
|
modules_metadata = []
|
|
@@ -138,6 +145,7 @@ def load_search_functions() -> Dict[str, LazySearchModule]:
|
|
|
138
145
|
|
|
139
146
|
if indice is not None:
|
|
140
147
|
modules_metadata.append((module_name, indice))
|
|
148
|
+
logging.info(f"Found module: {module_name} (index: {indice})")
|
|
141
149
|
|
|
142
150
|
except Exception as e:
|
|
143
151
|
console.print(f"[yellow]Warning: Could not read metadata from {module_name}: {str(e)}")
|
|
@@ -146,4 +154,5 @@ def load_search_functions() -> Dict[str, LazySearchModule]:
|
|
|
146
154
|
for module_name, indice in sorted(modules_metadata, key=lambda x: x[1]):
|
|
147
155
|
loaded_functions[f'{module_name}_search'] = LazySearchModule(module_name, indice)
|
|
148
156
|
|
|
157
|
+
logging.info(f"Loaded {len(loaded_functions)} search modules")
|
|
149
158
|
return loaded_functions
|
|
@@ -5,7 +5,7 @@ import logging
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
# External libraries
|
|
8
|
-
import
|
|
8
|
+
from curl_cffi import requests
|
|
9
9
|
from rich.console import Console
|
|
10
10
|
from pywidevine.cdm import Cdm
|
|
11
11
|
from pywidevine.device import Device
|
|
@@ -39,8 +39,13 @@ def get_widevine_keys(pssh, license_url, cdm_device_path, headers=None, payload=
|
|
|
39
39
|
req_headers = headers or {}
|
|
40
40
|
req_headers['Content-Type'] = 'application/octet-stream'
|
|
41
41
|
|
|
42
|
-
# Send license request
|
|
43
|
-
|
|
42
|
+
# Send license request using curl_cffi
|
|
43
|
+
try:
|
|
44
|
+
# response = httpx.post(license_url, data=challenge, headers=req_headers, content=payload)
|
|
45
|
+
response = requests.post(license_url, data=challenge, headers=req_headers, json=payload, impersonate="chrome124")
|
|
46
|
+
except Exception as e:
|
|
47
|
+
console.print(f"[bold red]Request error:[/bold red] {e}")
|
|
48
|
+
return None
|
|
44
49
|
|
|
45
50
|
if response.status_code != 200:
|
|
46
51
|
console.print(f"[bold red]License error:[/bold red] {response.status_code}, {response.text}")
|
|
@@ -16,6 +16,7 @@ from StreamingCommunity.Util.os import get_mp4decrypt_path
|
|
|
16
16
|
console = Console()
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
# NOTE!: SAREBBE MEGLIO FARLO PER OGNI FILE DURANTE IL DOWNLOAD ... MA PER ORA LO LASCIO COSI
|
|
19
20
|
def decrypt_with_mp4decrypt(encrypted_path, kid, key, output_path=None, cleanup=True):
|
|
20
21
|
"""
|
|
21
22
|
Decrypt an mp4/m4s file using mp4decrypt.
|
|
@@ -13,7 +13,7 @@ from rich.table import Table
|
|
|
13
13
|
|
|
14
14
|
# Internal utilities
|
|
15
15
|
from StreamingCommunity.Util.config_json import config_manager
|
|
16
|
-
from StreamingCommunity.Util.os import internet_manager
|
|
16
|
+
from StreamingCommunity.Util.os import os_manager, internet_manager
|
|
17
17
|
from StreamingCommunity.Util.http_client import create_client
|
|
18
18
|
from StreamingCommunity.Util.headers import get_userAgent
|
|
19
19
|
|
|
@@ -59,10 +59,17 @@ class DASH_Downloader:
|
|
|
59
59
|
self.license_url = license_url
|
|
60
60
|
self.mpd_url = mpd_url
|
|
61
61
|
self.mpd_sub_list = mpd_sub_list or []
|
|
62
|
-
self.out_path = os.path.splitext(os.path.abspath(
|
|
62
|
+
self.out_path = os.path.splitext(os.path.abspath(os_manager.get_sanitize_path(output_path)))[0]
|
|
63
63
|
self.original_output_path = output_path
|
|
64
64
|
self.file_already_exists = os.path.exists(self.original_output_path)
|
|
65
65
|
self.parser = None
|
|
66
|
+
|
|
67
|
+
# Added defaults to avoid AttributeError when no subtitles/audio/video are present
|
|
68
|
+
# Non la soluzione migliore ma evita crash in assenza di audio/video/subs
|
|
69
|
+
self.selected_subs = []
|
|
70
|
+
self.selected_video = None
|
|
71
|
+
self.selected_audio = None
|
|
72
|
+
|
|
66
73
|
self._setup_temp_dirs()
|
|
67
74
|
|
|
68
75
|
self.error = None
|