StreamingCommunity 3.2.9__py3-none-any.whl → 3.3.0__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/Site/altadefinizione/__init__.py +31 -14
- StreamingCommunity/Api/Site/animeunity/__init__.py +30 -14
- StreamingCommunity/Api/Site/animeworld/__init__.py +33 -7
- StreamingCommunity/Api/Site/crunchyroll/__init__.py +43 -9
- StreamingCommunity/Api/Site/crunchyroll/site.py +7 -1
- StreamingCommunity/Api/Site/guardaserie/__init__.py +36 -10
- StreamingCommunity/Api/Site/mediasetinfinity/__init__.py +36 -11
- StreamingCommunity/Api/Site/mediasetinfinity/site.py +8 -1
- StreamingCommunity/Api/Site/raiplay/__init__.py +46 -11
- StreamingCommunity/Api/Site/raiplay/film.py +2 -1
- StreamingCommunity/Api/Site/raiplay/series.py +12 -2
- StreamingCommunity/Api/Site/streamingcommunity/__init__.py +5 -7
- StreamingCommunity/Api/Site/streamingcommunity/site.py +4 -1
- StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +5 -2
- StreamingCommunity/Api/Site/streamingwatch/__init__.py +43 -9
- StreamingCommunity/Lib/Downloader/DASH/cdm_helpher.py +8 -0
- StreamingCommunity/Lib/Downloader/DASH/downloader.py +23 -21
- StreamingCommunity/Lib/Downloader/MP4/downloader.py +21 -3
- StreamingCommunity/Upload/update.py +2 -2
- StreamingCommunity/Upload/version.py +2 -2
- StreamingCommunity/Util/os.py +4 -1
- StreamingCommunity/run.py +4 -4
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/METADATA +5 -1
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/RECORD +28 -31
- StreamingCommunity/Api/Site/cb01new/__init__.py +0 -72
- StreamingCommunity/Api/Site/cb01new/film.py +0 -64
- StreamingCommunity/Api/Site/cb01new/site.py +0 -78
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/WHEEL +0 -0
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/entry_points.txt +0 -0
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/licenses/LICENSE +0 -0
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# 21.05.24
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
+
import sys
|
|
4
5
|
from typing import Tuple
|
|
5
6
|
|
|
6
7
|
|
|
@@ -57,7 +58,7 @@ def download_video(index_season_selected: int, index_episode_selected: int, scra
|
|
|
57
58
|
|
|
58
59
|
# Get episode information
|
|
59
60
|
obj_episode = scrape_serie.selectEpisode(index_season_selected, index_episode_selected-1)
|
|
60
|
-
console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [
|
|
61
|
+
console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [bold magenta]{obj_episode.name}[/bold magenta] ([cyan]S{index_season_selected}E{index_episode_selected}[/cyan]) \n")
|
|
61
62
|
|
|
62
63
|
# Define filename and path
|
|
63
64
|
mp4_name = f"{map_episode_title(scrape_serie.series_name, index_season_selected, index_episode_selected, obj_episode.name)}.mp4"
|
|
@@ -66,6 +67,15 @@ def download_video(index_season_selected: int, index_episode_selected: int, scra
|
|
|
66
67
|
# Get streaming URL
|
|
67
68
|
master_playlist = VideoSource.extract_m3u8_url(obj_episode.url)
|
|
68
69
|
|
|
70
|
+
# HLS
|
|
71
|
+
if ".mpd" not in master_playlist:
|
|
72
|
+
r_proc = HLS_Downloader(
|
|
73
|
+
m3u8_url=master_playlist,
|
|
74
|
+
output_path=os.path.join(mp4_path, mp4_name)
|
|
75
|
+
).start()
|
|
76
|
+
# Get streaming URL
|
|
77
|
+
master_playlist = VideoSource.extract_m3u8_url(obj_episode.url)
|
|
78
|
+
|
|
69
79
|
# HLS
|
|
70
80
|
if ".mpd" not in master_playlist:
|
|
71
81
|
r_proc = HLS_Downloader(
|
|
@@ -80,7 +90,7 @@ def download_video(index_season_selected: int, index_episode_selected: int, scra
|
|
|
80
90
|
cdm_device_path = get_wvd_path()
|
|
81
91
|
if not cdm_device_path or not isinstance(cdm_device_path, (str, bytes, os.PathLike)) or not os.path.isfile(cdm_device_path):
|
|
82
92
|
console.print(f"[bold red] CDM file not found or invalid path: {cdm_device_path}[/bold red]")
|
|
83
|
-
|
|
93
|
+
sys.exit(0)
|
|
84
94
|
|
|
85
95
|
license_url = generate_license_url(obj_episode.mpd_id)
|
|
86
96
|
|
|
@@ -15,7 +15,6 @@ from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
|
15
15
|
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
16
16
|
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
# Logic class
|
|
20
19
|
from .site import title_search, table_show_manager, media_search_manager
|
|
21
20
|
from .film import download_film
|
|
@@ -24,7 +23,7 @@ from .series import download_series
|
|
|
24
23
|
|
|
25
24
|
# Variable
|
|
26
25
|
indice = 0
|
|
27
|
-
_useFor = "Film_&_Serie"
|
|
26
|
+
_useFor = "Film_&_Serie"
|
|
28
27
|
_priority = 0
|
|
29
28
|
_engineDownload = "hls"
|
|
30
29
|
_deprecate = False
|
|
@@ -125,9 +124,9 @@ def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_
|
|
|
125
124
|
actual_search_query = get_user_input(string_to_search)
|
|
126
125
|
|
|
127
126
|
# Handle cases where user input is empty, or 'back' was handled (sys.exit or None return)
|
|
128
|
-
if not actual_search_query:
|
|
127
|
+
if not actual_search_query:
|
|
129
128
|
if bot:
|
|
130
|
-
|
|
129
|
+
if actual_search_query is None: # Specifically for timeout from bot.ask or failed restart
|
|
131
130
|
bot.send_message("Search term not provided or operation cancelled. Returning.", None)
|
|
132
131
|
return
|
|
133
132
|
|
|
@@ -136,16 +135,15 @@ def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_
|
|
|
136
135
|
|
|
137
136
|
# If only the database object (media_search_manager populated by title_search) is needed
|
|
138
137
|
if get_onlyDatabase:
|
|
139
|
-
return media_search_manager
|
|
138
|
+
return media_search_manager
|
|
140
139
|
|
|
141
140
|
if len_database > 0:
|
|
142
141
|
select_title = get_select_title(table_show_manager, media_search_manager, len_database)
|
|
143
142
|
process_search_result(select_title, selections)
|
|
144
143
|
|
|
145
144
|
else:
|
|
146
|
-
no_results_message = f"No results found for: '{actual_search_query}'"
|
|
147
145
|
if bot:
|
|
148
|
-
bot.send_message(
|
|
146
|
+
bot.send_message(f"No results found for: '{actual_search_query}'", None)
|
|
149
147
|
else:
|
|
150
148
|
console.print(f"\n[red]Nothing matching was found for[white]: [purple]{actual_search_query}")
|
|
151
149
|
|
|
@@ -26,6 +26,7 @@ console = Console()
|
|
|
26
26
|
media_search_manager = MediaManager()
|
|
27
27
|
table_show_manager = TVShowManager()
|
|
28
28
|
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
29
|
+
ssl_verify = config_manager.get_bool("REQUESTS", "verify")
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
def title_search(query: str) -> int:
|
|
@@ -49,6 +50,7 @@ def title_search(query: str) -> int:
|
|
|
49
50
|
f"{site_constant.FULL_URL}/it",
|
|
50
51
|
headers={'user-agent': get_userAgent()},
|
|
51
52
|
timeout=max_timeout,
|
|
53
|
+
verify=ssl_verify,
|
|
52
54
|
follow_redirects=True
|
|
53
55
|
)
|
|
54
56
|
response.raise_for_status()
|
|
@@ -75,7 +77,8 @@ def title_search(query: str) -> int:
|
|
|
75
77
|
'x-inertia': 'true',
|
|
76
78
|
'x-inertia-version': version
|
|
77
79
|
},
|
|
78
|
-
timeout=max_timeout
|
|
80
|
+
timeout=max_timeout,
|
|
81
|
+
verify=ssl_verify
|
|
79
82
|
)
|
|
80
83
|
response.raise_for_status()
|
|
81
84
|
|
|
@@ -17,6 +17,7 @@ from StreamingCommunity.Api.Player.Helper.Vixcloud.util import SeasonManager
|
|
|
17
17
|
|
|
18
18
|
# Variable
|
|
19
19
|
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
20
|
+
ssl_verify = config_manager.get_bool("REQUESTS", "verify")
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
class GetSerieInfo:
|
|
@@ -50,7 +51,8 @@ class GetSerieInfo:
|
|
|
50
51
|
response = httpx.get(
|
|
51
52
|
url=f"{self.url}/titles/{self.media_id}-{self.series_name}",
|
|
52
53
|
headers=self.headers,
|
|
53
|
-
timeout=max_timeout
|
|
54
|
+
timeout=max_timeout,
|
|
55
|
+
verify=ssl_verify
|
|
54
56
|
)
|
|
55
57
|
response.raise_for_status()
|
|
56
58
|
|
|
@@ -104,7 +106,8 @@ class GetSerieInfo:
|
|
|
104
106
|
'x-inertia': 'true',
|
|
105
107
|
'x-inertia-version': self.version,
|
|
106
108
|
},
|
|
107
|
-
timeout=max_timeout
|
|
109
|
+
timeout=max_timeout,
|
|
110
|
+
verify=ssl_verify
|
|
108
111
|
)
|
|
109
112
|
|
|
110
113
|
# Extract episodes from JSON response
|
|
@@ -9,6 +9,7 @@ from rich.prompt import Prompt
|
|
|
9
9
|
from StreamingCommunity.Api.Template import get_select_title
|
|
10
10
|
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
11
11
|
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
12
|
+
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
# Logic class
|
|
@@ -45,6 +46,13 @@ def process_search_result(select_title, selections=None):
|
|
|
45
46
|
selections (dict, optional): Dictionary containing selection inputs that bypass manual input
|
|
46
47
|
{'season': season_selection, 'episode': episode_selection}
|
|
47
48
|
"""
|
|
49
|
+
if not select_title:
|
|
50
|
+
if site_constant.TELEGRAM_BOT:
|
|
51
|
+
bot = get_bot_instance()
|
|
52
|
+
bot.send_message("No title selected or selection cancelled.", None)
|
|
53
|
+
else:
|
|
54
|
+
console.print("[yellow]No title selected or selection cancelled.")
|
|
55
|
+
return
|
|
48
56
|
if select_title.type == 'tv':
|
|
49
57
|
season_selection = None
|
|
50
58
|
episode_selection = None
|
|
@@ -69,26 +77,52 @@ def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_
|
|
|
69
77
|
selections (dict, optional): Dictionary containing selection inputs that bypass manual input
|
|
70
78
|
{'season': season_selection, 'episode': episode_selection}
|
|
71
79
|
"""
|
|
80
|
+
"""
|
|
81
|
+
Main function of the application for search.
|
|
82
|
+
|
|
83
|
+
Parameters:
|
|
84
|
+
string_to_search (str, optional): String to search for
|
|
85
|
+
get_onlyDatabase (bool, optional): If True, return only the database object
|
|
86
|
+
direct_item (dict, optional): Direct item to process (bypass search)
|
|
87
|
+
selections (dict, optional): Dictionary containing selection inputs that bypass manual input
|
|
88
|
+
{'season': season_selection, 'episode': episode_selection}
|
|
89
|
+
"""
|
|
90
|
+
bot = None
|
|
91
|
+
if site_constant.TELEGRAM_BOT:
|
|
92
|
+
bot = get_bot_instance()
|
|
93
|
+
|
|
72
94
|
if direct_item:
|
|
73
95
|
select_title = MediaItem(**direct_item)
|
|
74
96
|
process_search_result(select_title, selections)
|
|
75
97
|
return
|
|
76
98
|
|
|
77
|
-
|
|
78
|
-
|
|
99
|
+
# Get the user input for the search term
|
|
100
|
+
actual_search_query = get_user_input(string_to_search)
|
|
101
|
+
|
|
102
|
+
# Handle cases where user input is empty, or 'back' was handled (sys.exit or None return)
|
|
103
|
+
if not actual_search_query:
|
|
104
|
+
if bot:
|
|
105
|
+
if actual_search_query is None: # Specifically for timeout from bot.ask or failed restart
|
|
106
|
+
bot.send_message("Search term not provided or operation cancelled. Returning.", None)
|
|
107
|
+
return
|
|
79
108
|
|
|
80
|
-
# Perform
|
|
81
|
-
len_database = title_search(
|
|
109
|
+
# Perform the database search
|
|
110
|
+
len_database = title_search(actual_search_query)
|
|
82
111
|
|
|
83
112
|
# If only the database is needed, return the manager
|
|
84
113
|
if get_onlyDatabase:
|
|
85
114
|
return media_search_manager
|
|
86
|
-
|
|
115
|
+
|
|
87
116
|
if len_database > 0:
|
|
88
|
-
select_title = get_select_title(table_show_manager, media_search_manager,len_database)
|
|
117
|
+
select_title = get_select_title(table_show_manager, media_search_manager, len_database)
|
|
89
118
|
process_search_result(select_title, selections)
|
|
90
119
|
|
|
91
120
|
else:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
121
|
+
if bot:
|
|
122
|
+
bot.send_message(f"No results found for: '{actual_search_query}'", None)
|
|
123
|
+
else:
|
|
124
|
+
console.print(f"\n[red]Nothing matching was found for[white]: [purple]{actual_search_query}")
|
|
125
|
+
|
|
126
|
+
# Do not call search() recursively here to avoid infinite loops on no results.
|
|
127
|
+
# The flow should return to the caller (e.g., main menu in run.py).
|
|
128
|
+
return
|
|
@@ -62,6 +62,14 @@ def get_widevine_keys(pssh, license_url, cdm_device_path, headers=None, payload=
|
|
|
62
62
|
|
|
63
63
|
if response.status_code != 200:
|
|
64
64
|
console.print(f"[bold red]License error:[/bold red] {response.status_code}, {response.text}")
|
|
65
|
+
console.print({
|
|
66
|
+
"url": license_url,
|
|
67
|
+
"headers": req_headers,
|
|
68
|
+
"content": payload,
|
|
69
|
+
"session_id": session_id.hex(),
|
|
70
|
+
"pssh": pssh
|
|
71
|
+
})
|
|
72
|
+
|
|
65
73
|
return None
|
|
66
74
|
|
|
67
75
|
# Handle (JSON) or classic (binary) license response
|
|
@@ -99,28 +99,30 @@ class DASH_Downloader:
|
|
|
99
99
|
if rep:
|
|
100
100
|
encrypted_path = os.path.join(self.encrypted_dir, f"{rep['id']}_encrypted.m4s")
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
102
|
+
# If m4s file doesn't exist start downloading
|
|
103
|
+
if not os.path.exists(encrypted_path):
|
|
104
|
+
downloader = MPD_Segments(
|
|
105
|
+
tmp_folder=self.encrypted_dir,
|
|
106
|
+
representation=rep,
|
|
107
|
+
pssh=self.parser.pssh
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
try:
|
|
111
|
+
result = downloader.download_streams()
|
|
112
|
+
|
|
113
|
+
# Check for interruption or failure
|
|
114
|
+
if result.get("stopped"):
|
|
115
|
+
self.stopped = True
|
|
116
|
+
self.error = "Download interrupted"
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
if result.get("nFailed", 0) > 0:
|
|
120
|
+
self.error = f"Failed segments: {result['nFailed']}"
|
|
121
|
+
return False
|
|
122
|
+
|
|
123
|
+
except Exception as ex:
|
|
124
|
+
self.error = str(ex)
|
|
115
125
|
return False
|
|
116
|
-
|
|
117
|
-
if result.get("nFailed", 0) > 0:
|
|
118
|
-
self.error = f"Failed segments: {result['nFailed']}"
|
|
119
|
-
return False
|
|
120
|
-
|
|
121
|
-
except Exception as ex:
|
|
122
|
-
self.error = str(ex)
|
|
123
|
-
return False
|
|
124
126
|
|
|
125
127
|
if not self.parser.pssh:
|
|
126
128
|
print("No PSSH found: segments are not encrypted, skipping decryption.")
|
|
@@ -7,6 +7,7 @@ import time
|
|
|
7
7
|
import signal
|
|
8
8
|
import logging
|
|
9
9
|
from functools import partial
|
|
10
|
+
import threading
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
# External libraries
|
|
@@ -101,10 +102,23 @@ def MP4_downloader(url: str, path: str, referer: str = None, headers_: dict = No
|
|
|
101
102
|
else:
|
|
102
103
|
headers['User-Agent'] = get_userAgent()
|
|
103
104
|
|
|
104
|
-
# Set interrupt handler
|
|
105
|
+
# Set interrupt handler (only in main thread). In background threads (e.g., Django), skip custom signal handling.
|
|
105
106
|
temp_path = f"{path}.temp"
|
|
106
107
|
interrupt_handler = InterruptHandler()
|
|
107
|
-
original_handler =
|
|
108
|
+
original_handler = None
|
|
109
|
+
try:
|
|
110
|
+
if threading.current_thread() is threading.main_thread():
|
|
111
|
+
original_handler = signal.signal(
|
|
112
|
+
signal.SIGINT,
|
|
113
|
+
partial(
|
|
114
|
+
signal_handler,
|
|
115
|
+
interrupt_handler=interrupt_handler,
|
|
116
|
+
original_handler=signal.getsignal(signal.SIGINT),
|
|
117
|
+
),
|
|
118
|
+
)
|
|
119
|
+
except Exception:
|
|
120
|
+
# If setting signal handler fails (non-main thread), continue without it
|
|
121
|
+
original_handler = None
|
|
108
122
|
|
|
109
123
|
# Ensure the output directory exists
|
|
110
124
|
os.makedirs(os.path.dirname(path), exist_ok=True)
|
|
@@ -184,4 +198,8 @@ def MP4_downloader(url: str, path: str, referer: str = None, headers_: dict = No
|
|
|
184
198
|
return None, interrupt_handler.kill_download
|
|
185
199
|
|
|
186
200
|
finally:
|
|
187
|
-
|
|
201
|
+
if original_handler is not None:
|
|
202
|
+
try:
|
|
203
|
+
signal.signal(signal.SIGINT, original_handler)
|
|
204
|
+
except Exception:
|
|
205
|
+
pass
|
|
@@ -90,7 +90,7 @@ def update():
|
|
|
90
90
|
latest_commit_message = 'No commit history available'
|
|
91
91
|
|
|
92
92
|
console.print(f"\n[cyan]Current installed version: [yellow]{current_version}")
|
|
93
|
-
console.print(f"[cyan]Last commit: [yellow]{latest_commit_message}")
|
|
93
|
+
console.print(f"[cyan]Last commit: [yellow]{latest_commit_message.splitlines()[0]}")
|
|
94
94
|
|
|
95
95
|
if str(current_version).replace('v', '') != str(last_version).replace('v', ''):
|
|
96
96
|
console.print(f"\n[cyan]New version available: [yellow]{last_version}")
|
|
@@ -98,4 +98,4 @@ def update():
|
|
|
98
98
|
console.print(f"\n[red]{__title__} has been downloaded [yellow]{total_download_count} [red]times, but only [yellow]{percentual_stars}% [red]of users have starred it.\n\
|
|
99
99
|
[cyan]Help the repository grow today by leaving a [yellow]star [cyan]and [yellow]sharing [cyan]it with others online!")
|
|
100
100
|
|
|
101
|
-
time.sleep(4)
|
|
101
|
+
time.sleep(4)
|
StreamingCommunity/Util/os.py
CHANGED
|
@@ -435,7 +435,10 @@ class OsSummary:
|
|
|
435
435
|
ffmpeg_str = f"'{self.ffmpeg_path}'" if self.ffmpeg_path else "None"
|
|
436
436
|
ffprobe_str = f"'{self.ffprobe_path}'" if self.ffprobe_path else "None"
|
|
437
437
|
mp4decrypt_str = f"'{self.mp4decrypt_path}'" if self.mp4decrypt_path else "None"
|
|
438
|
-
|
|
438
|
+
wvd_path = get_wvd_path()
|
|
439
|
+
wvd_str = f"'{wvd_path}'" if wvd_path else "None"
|
|
440
|
+
|
|
441
|
+
console.print(f"[cyan]Path: [red]ffmpeg [bold yellow]{ffmpeg_str}[/bold yellow][white], [red]ffprobe [bold yellow]{ffprobe_str}[/bold yellow][white], [red]mp4decrypt [bold yellow]{mp4decrypt_str}[/bold yellow][white], [red]wvd [bold yellow]{wvd_str}[/bold yellow]")
|
|
439
442
|
|
|
440
443
|
|
|
441
444
|
os_manager = OsManager()
|
StreamingCommunity/run.py
CHANGED
|
@@ -329,13 +329,13 @@ def check_dns_and_exit_if_needed():
|
|
|
329
329
|
]
|
|
330
330
|
|
|
331
331
|
if not internet_manager.check_dns_resolve(hostname_list):
|
|
332
|
-
console.print("[red]
|
|
332
|
+
console.print("[red]\nERROR: DNS configuration is required!")
|
|
333
333
|
console.print("[red]The program cannot function correctly without proper DNS settings.")
|
|
334
|
-
console.print("[yellow]Please configure one of these DNS servers:")
|
|
334
|
+
console.print("\n[yellow]Please configure one of these DNS servers:")
|
|
335
335
|
console.print("[red]• Cloudflare (1.1.1.1) 'https://developers.cloudflare.com/1.1.1.1/setup/windows/'")
|
|
336
336
|
console.print("[red]• Quad9 (9.9.9.9) 'https://docs.quad9.net/Setup_Guides/Windows/Windows_10/'")
|
|
337
|
-
console.print("\n[yellow]
|
|
338
|
-
|
|
337
|
+
console.print("\n[yellow]-> The program will not work until you configure your DNS settings.")
|
|
338
|
+
sys.exit(0)
|
|
339
339
|
|
|
340
340
|
|
|
341
341
|
def setup_argument_parser(search_functions):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: StreamingCommunity
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Home-page: https://github.com/Lovi-0/StreamingCommunity
|
|
5
5
|
Author: Lovi-0
|
|
6
6
|
Project-URL: Bug Reports, https://github.com/Lovi-0/StreamingCommunity/issues
|
|
@@ -906,6 +906,10 @@ python3 telegram_bot.py
|
|
|
906
906
|
```
|
|
907
907
|
</details>
|
|
908
908
|
|
|
909
|
+
# SITE_LOGIN key
|
|
910
|
+
To use some site, you may need a SITE_LOGIN key.
|
|
911
|
+
See [guide.md](.github/.site/guide.md) for instructions on how to obtain it.
|
|
912
|
+
|
|
909
913
|
# Tutorials
|
|
910
914
|
|
|
911
915
|
- [Windows](https://www.youtube.com/watch?v=mZGqK4wdN-k)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
StreamingCommunity/__init__.py,sha256=kOpFRfO3jz3gP2QjgPC_G85Z3rsMwMnsNa0POXMnDng,382
|
|
2
2
|
StreamingCommunity/global_search.py,sha256=ip3D0OKNRTXHpe_Wy7v2KM-yNZdnnbG5FOBYSSk6wB8,12401
|
|
3
|
-
StreamingCommunity/run.py,sha256=
|
|
3
|
+
StreamingCommunity/run.py,sha256=QKXm49zG8Q2STHk8Rx3uUJl5B8KEvJZnoBDkhigJR00,21122
|
|
4
4
|
StreamingCommunity/Api/Player/ddl.py,sha256=cPinK99iX4ThvAHLlzcACcnFvM-M_NK0f4imh9PQY1I,2174
|
|
5
5
|
StreamingCommunity/Api/Player/hdplayer.py,sha256=uQGU8ZVEk7qwwu1v4fjxScsP2x9NIHc7rRguXB1Fk2c,1942
|
|
6
6
|
StreamingCommunity/Api/Player/maxstream.py,sha256=JlVTCAo9ze0wF2h0eNPYqdorhwK7DPXpmLAyHMnT7-Y,5017
|
|
@@ -11,53 +11,50 @@ StreamingCommunity/Api/Player/sweetpixel.py,sha256=AAdLSD7ASLuZNiBx6btr8S44Wkxtj
|
|
|
11
11
|
StreamingCommunity/Api/Player/vixcloud.py,sha256=0DnukAIBqGqTmL9I6JkpAkHLMf1UG1D_J8c7zt6KDmU,6609
|
|
12
12
|
StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py,sha256=U-8QlD5kGzIk3-4t4D6QyYmiDe8UBrSuVi1YHRQb7AU,4295
|
|
13
13
|
StreamingCommunity/Api/Player/Helper/Vixcloud/util.py,sha256=WjpNA-ohE6AIwYOVzacYqy7CR3fXfdf7PfIp69vk8js,5343
|
|
14
|
-
StreamingCommunity/Api/Site/altadefinizione/__init__.py,sha256=
|
|
14
|
+
StreamingCommunity/Api/Site/altadefinizione/__init__.py,sha256=fpFUhnjjRE2TXf1lNFBUoHH-WWyFQpXeG1xqkU_cQjw,4877
|
|
15
15
|
StreamingCommunity/Api/Site/altadefinizione/film.py,sha256=CQG1C9RGbPm_x89xgyTS8IqcP-lihNqCDY9ANghOlhE,3798
|
|
16
16
|
StreamingCommunity/Api/Site/altadefinizione/series.py,sha256=--XPvUzL4K3KKaS41jZ9WToT3wxt2rUwblNoJOp8hs0,8280
|
|
17
17
|
StreamingCommunity/Api/Site/altadefinizione/site.py,sha256=nrDmENnvWbW7iNO7OIGpQWJttzFGipZg0dsC8GiSEBU,2864
|
|
18
18
|
StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py,sha256=9iulNlnNAhTfI5iKNW3I6pZqYeYwovAswa13L3LPGDM,4251
|
|
19
|
-
StreamingCommunity/Api/Site/animeunity/__init__.py,sha256=
|
|
19
|
+
StreamingCommunity/Api/Site/animeunity/__init__.py,sha256=3eQ-AtLQCQK_ArTnnDit_NK5r04PuyPSSvEm4TUC9WE,4746
|
|
20
20
|
StreamingCommunity/Api/Site/animeunity/film.py,sha256=Vqg6yag2siR-Y3ougBsV8mzdQXChxg6ghz_KVXFQ3pE,998
|
|
21
21
|
StreamingCommunity/Api/Site/animeunity/serie.py,sha256=2PfpXblRpIrHC6gURfKYo16Vx_ZDcQX4CX03wAo8SCQ,5694
|
|
22
22
|
StreamingCommunity/Api/Site/animeunity/site.py,sha256=GLULPQATMHcXiH99d772v1ICH-PnnZgSM3q5__eN-gs,4977
|
|
23
23
|
StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py,sha256=UladSvOlTEVLiV0-rAz45zrET5qRHMuTGuKEpeQoumU,3872
|
|
24
|
-
StreamingCommunity/Api/Site/animeworld/__init__.py,sha256=
|
|
24
|
+
StreamingCommunity/Api/Site/animeworld/__init__.py,sha256=kbsIxaAJtnEyFIbAS-IdCdPWrrynE_1TLzHtZzYYDWE,3783
|
|
25
25
|
StreamingCommunity/Api/Site/animeworld/film.py,sha256=Ysp0k5AlrOsl19S9LV4nwVg8cjFf5w0FZRO9CiO6NxA,1748
|
|
26
26
|
StreamingCommunity/Api/Site/animeworld/serie.py,sha256=b1yuBnLNqJ-IWEVqLnQuYv6VbUQ60a5YFpZbJrS3lnI,3486
|
|
27
27
|
StreamingCommunity/Api/Site/animeworld/site.py,sha256=Zdp6ayA1L6hS1t0q4fclHs7J1eiD16Ta9isTc13Zye8,3746
|
|
28
28
|
StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py,sha256=S6sLtQt4Wvp4IVDho1uAXL8_-bbdj-RTRA1D7x9V8n8,3591
|
|
29
|
-
StreamingCommunity/Api/Site/
|
|
30
|
-
StreamingCommunity/Api/Site/cb01new/film.py,sha256=GMeWhUaXEzNatedp8Wcjl-UtLgkRQ6bip9YjcqPsIMw,1736
|
|
31
|
-
StreamingCommunity/Api/Site/cb01new/site.py,sha256=82GPxjOyY7Dlj1WbA0YNovgbKhuF3Vmca07IVXGh6lE,2139
|
|
32
|
-
StreamingCommunity/Api/Site/crunchyroll/__init__.py,sha256=4RucBcJnPZFIXErTcpWC9UU8vuSEGTp-mCrDHhcuC1Q,3428
|
|
29
|
+
StreamingCommunity/Api/Site/crunchyroll/__init__.py,sha256=tkjI_Spx6lOD95gVlSCwh2FeS1OMxKt1yXx6jYWayww,4893
|
|
33
30
|
StreamingCommunity/Api/Site/crunchyroll/film.py,sha256=MgA8bwJEf6unT_uBBsLpMqRdbctkLYLGeBB-_fX1wvk,2615
|
|
34
31
|
StreamingCommunity/Api/Site/crunchyroll/series.py,sha256=0JnPc9Bw02Ys-wmdAvcIbAlkyGHbw7ELemWVizWPl1k,7265
|
|
35
|
-
StreamingCommunity/Api/Site/crunchyroll/site.py,sha256=
|
|
32
|
+
StreamingCommunity/Api/Site/crunchyroll/site.py,sha256=0IRbC7xPyfdHGNffZzGkpCzqZ0zB3o0MWe5sQLVmRVk,4073
|
|
36
33
|
StreamingCommunity/Api/Site/crunchyroll/util/ScrapeSerie.py,sha256=ZY6z4pT5q7igiNZnJAvE9x0WiORTvFSH-U_CpqOzusA,7855
|
|
37
34
|
StreamingCommunity/Api/Site/crunchyroll/util/get_license.py,sha256=KpVvJbGUTLeVD-tt8r7ajBPWVT7Tm6GrKwzpW8CS-tg,6881
|
|
38
|
-
StreamingCommunity/Api/Site/guardaserie/__init__.py,sha256=
|
|
35
|
+
StreamingCommunity/Api/Site/guardaserie/__init__.py,sha256=xKdy4puK4NI4ytFMZLqZXNeKaX8ub14mqpuelRFprSs,3800
|
|
39
36
|
StreamingCommunity/Api/Site/guardaserie/series.py,sha256=Q5i_nCAy8zAnublmWuujxrDwvP9XP2D207vrtYOdl_I,6566
|
|
40
37
|
StreamingCommunity/Api/Site/guardaserie/site.py,sha256=_AtrkOb5xUnIfqp212y3p7kWb7BKJYwQHleSRgDOSYA,2239
|
|
41
38
|
StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py,sha256=4wk2TVb4YDoPrhR2uuNijYuOpSt9mhcxwcXhmwTHPUY,4396
|
|
42
|
-
StreamingCommunity/Api/Site/mediasetinfinity/__init__.py,sha256=
|
|
39
|
+
StreamingCommunity/Api/Site/mediasetinfinity/__init__.py,sha256=xfGtJEJx3LE7e-0UN85PipJ0VUJ4vk2JZHXUkrN65-Q,4286
|
|
43
40
|
StreamingCommunity/Api/Site/mediasetinfinity/film.py,sha256=L3jWSuxxO9SwRua9-zSF-nYfbwbmI4YG7YAM5yQlsDs,2308
|
|
44
41
|
StreamingCommunity/Api/Site/mediasetinfinity/series.py,sha256=BtZaZmpJ7-tbMPmosRLbZG4-oaIMK3Q1CHV29A5xmng,6898
|
|
45
|
-
StreamingCommunity/Api/Site/mediasetinfinity/site.py,sha256=
|
|
42
|
+
StreamingCommunity/Api/Site/mediasetinfinity/site.py,sha256=n2c_Yg03fbOIx4ZYOg2FVoHM0rge16LIdACNvOyrURM,3872
|
|
46
43
|
StreamingCommunity/Api/Site/mediasetinfinity/util/ScrapeSerie.py,sha256=jZiSfwrvfdqu_dM0LG55VIsntM66OhRHGTP0o_78eUM,11174
|
|
47
44
|
StreamingCommunity/Api/Site/mediasetinfinity/util/fix_mpd.py,sha256=B7uZfQ8X4p8KsiPVangFSs5rKKKpA3tavjPCdNrqyCc,1712
|
|
48
45
|
StreamingCommunity/Api/Site/mediasetinfinity/util/get_license.py,sha256=CK1gmXlARi83DLrJzUeaQoFUOYiJtagtmG4AGUi11rY,5584
|
|
49
|
-
StreamingCommunity/Api/Site/raiplay/__init__.py,sha256=
|
|
50
|
-
StreamingCommunity/Api/Site/raiplay/film.py,sha256=
|
|
51
|
-
StreamingCommunity/Api/Site/raiplay/series.py,sha256=
|
|
46
|
+
StreamingCommunity/Api/Site/raiplay/__init__.py,sha256=m8kN-_apnOoPQ7DBQ4ZK2hEXmw6ITt2ja7pO0OhDX9Y,4641
|
|
47
|
+
StreamingCommunity/Api/Site/raiplay/film.py,sha256=Ep1Kcbvm2nZoHvaxW5Qbg4FBl9QZORM-NEi2obhQyos,3029
|
|
48
|
+
StreamingCommunity/Api/Site/raiplay/series.py,sha256=EJx3ZUmXOGlha6J1vP93XVfh1VDAN_9fz_06dtdhIqI,7599
|
|
52
49
|
StreamingCommunity/Api/Site/raiplay/site.py,sha256=e0DoTIcSNLbk8uEBGgYCG6gbZ6yv-yo0Z-rT7PLNTlo,3182
|
|
53
50
|
StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py,sha256=KsEL8XSr_c1vvaPo-_AY9RGE7_eHZ8oN2iyZtB0ocrw,5880
|
|
54
51
|
StreamingCommunity/Api/Site/raiplay/util/get_license.py,sha256=96Q5aSWhtxtmQl2yzylL-1x3jY24UpLLZlEE6YrO_gs,978
|
|
55
|
-
StreamingCommunity/Api/Site/streamingcommunity/__init__.py,sha256=
|
|
52
|
+
StreamingCommunity/Api/Site/streamingcommunity/__init__.py,sha256=6ETXEt0c-TnPkuO8wHo6VCphqM2LKuVr811eLxNJbsc,5469
|
|
56
53
|
StreamingCommunity/Api/Site/streamingcommunity/film.py,sha256=aA0tsDc5GCFFkrn_s2QKNcnyBYhK2S5OnDx29P1_rhA,2779
|
|
57
54
|
StreamingCommunity/Api/Site/streamingcommunity/series.py,sha256=eLCeVjur2w2J1PgYzhe8dIJYGZus6YEyQr5H0YXazH4,9055
|
|
58
|
-
StreamingCommunity/Api/Site/streamingcommunity/site.py,sha256=
|
|
59
|
-
StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py,sha256=
|
|
60
|
-
StreamingCommunity/Api/Site/streamingwatch/__init__.py,sha256=
|
|
55
|
+
StreamingCommunity/Api/Site/streamingcommunity/site.py,sha256=o1jdgF1nnUCnPnvybfc6a-0esHSYcRGjtUEOAXk6YAE,4131
|
|
56
|
+
StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py,sha256=b-PWO1fP68yfptLb5X3i4M1PFZHKkqJh32yHgKsoIGs,5684
|
|
57
|
+
StreamingCommunity/Api/Site/streamingwatch/__init__.py,sha256=K9gAeeJ6h7CQOhxXC2bUTXG4z9Dtv2R4Vv6XDSj9sik,4851
|
|
61
58
|
StreamingCommunity/Api/Site/streamingwatch/film.py,sha256=B_9z9xzfuqEbzv-eVHuadvOKTcEiHhRU92Gk_f2u7Zs,1693
|
|
62
59
|
StreamingCommunity/Api/Site/streamingwatch/series.py,sha256=nxGef_djMUZLAEDbHG-hbbly0eWagxPm8xu5aFIlSrI,6245
|
|
63
60
|
StreamingCommunity/Api/Site/streamingwatch/site.py,sha256=KEtm-TeTuryAODXdvJAGPHauaq8cVl8QxHV6CDT1mzo,3474
|
|
@@ -69,14 +66,14 @@ StreamingCommunity/Api/Template/Class/SearchType.py,sha256=LOlE8UgraEM0UAVeNCThD
|
|
|
69
66
|
StreamingCommunity/Api/Template/Util/__init__.py,sha256=v23VkosPNOQG5XbDkyCx5shEVJvRJffgkAF_Am5zMQc,377
|
|
70
67
|
StreamingCommunity/Api/Template/Util/manage_ep.py,sha256=JMGLj_SJY-K5YuvKISurEYyS-pa9jZ2EA-lshVS73z0,9268
|
|
71
68
|
StreamingCommunity/Lib/Downloader/__init__.py,sha256=Zh92xTvBIEIjNQN22iXItG7_VqiDGbOpO5gOZDBdGxc,288
|
|
72
|
-
StreamingCommunity/Lib/Downloader/DASH/cdm_helpher.py,sha256
|
|
69
|
+
StreamingCommunity/Lib/Downloader/DASH/cdm_helpher.py,sha256=-odu7Hc5dvzRXldQRlFalt6IVfvqi6XG_DCSyyqBGJ4,4767
|
|
73
70
|
StreamingCommunity/Lib/Downloader/DASH/decrypt.py,sha256=y3F5zrED-FSQzwE9e5rTl07aWkg76qwFgxtziPpPVuQ,2352
|
|
74
|
-
StreamingCommunity/Lib/Downloader/DASH/downloader.py,sha256=
|
|
71
|
+
StreamingCommunity/Lib/Downloader/DASH/downloader.py,sha256=rswcxVXem_ddCbByZY1VbgdaQnhztsG02gMU7ZeD37s,8294
|
|
75
72
|
StreamingCommunity/Lib/Downloader/DASH/parser.py,sha256=QUyYhmu-zI2GieiNZaoOoDVPTclSKXsrdeToAtbC9yI,9858
|
|
76
73
|
StreamingCommunity/Lib/Downloader/DASH/segments.py,sha256=oiip_q3QOY_c17_t66D0m974hyzsQXivhHY5-uE9dlQ,12747
|
|
77
74
|
StreamingCommunity/Lib/Downloader/HLS/downloader.py,sha256=5ZOflDthkkmgZIGyLzL1Ao6ltyoJkQ7wAFe744Dyppk,21294
|
|
78
75
|
StreamingCommunity/Lib/Downloader/HLS/segments.py,sha256=YqlG628N7I0STPQhchw5LM7kerv8XjTzdzh8N-dw2QM,17914
|
|
79
|
-
StreamingCommunity/Lib/Downloader/MP4/downloader.py,sha256=
|
|
76
|
+
StreamingCommunity/Lib/Downloader/MP4/downloader.py,sha256=_z61uQVnlfh-ktWYTisfbg_a4C3tpK7MO8HUdgLhTpI,8060
|
|
80
77
|
StreamingCommunity/Lib/Downloader/TOR/downloader.py,sha256=tYOCuKkKDcTIJ-2bGIeplovRkLTdp89i8lUvJs_N9jc,19133
|
|
81
78
|
StreamingCommunity/Lib/FFmpeg/__init__.py,sha256=NZmOXpnc5jvdvjNnHPxvj5bzp0GUuNMXd00Fcy4rQPI,258
|
|
82
79
|
StreamingCommunity/Lib/FFmpeg/capture.py,sha256=UUBaFK8WLkvqxsElqyEj-JvDvd9zUFZ2bRwRoUcGjVk,5039
|
|
@@ -93,8 +90,8 @@ StreamingCommunity/Lib/TMBD/tmdb.py,sha256=byg0EFnlmd9JeLvn1N9K3QkB1KEfeMuFa7OVf
|
|
|
93
90
|
StreamingCommunity/TelegramHelp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
94
91
|
StreamingCommunity/TelegramHelp/config.json,sha256=v7FjA4smyLWZxChATewmvxDjJcclOCRZ_BIFPJd8Jvc,1374
|
|
95
92
|
StreamingCommunity/TelegramHelp/telegram_bot.py,sha256=KiurpTrgiUNyMcLfceseaxV4xGegCUSJ8YttSeGXhJM,26429
|
|
96
|
-
StreamingCommunity/Upload/update.py,sha256=
|
|
97
|
-
StreamingCommunity/Upload/version.py,sha256=
|
|
93
|
+
StreamingCommunity/Upload/update.py,sha256=9DStkCA_GGHjf47eDjUe-YeQ2mXhjmY-6E5C-HAwPlo,3829
|
|
94
|
+
StreamingCommunity/Upload/version.py,sha256=4e7vj7d6prEkm_3AF-tkZtIZ_DTn6sEocD_tl9G52mg,171
|
|
98
95
|
StreamingCommunity/Util/bento4_installer.py,sha256=P5ipziMCvezxan8GUh9vm8B1LXGyHusFVDf842LSwis,6966
|
|
99
96
|
StreamingCommunity/Util/color.py,sha256=NvD0Eni-25oOOkY-szCEoc0lGvzQxyL7xhM0RE4EvUM,458
|
|
100
97
|
StreamingCommunity/Util/config_json.py,sha256=vB6o6J5V874_bp9Y87VCCxp2wig0P3vwz4--zVokH4o,28576
|
|
@@ -103,11 +100,11 @@ StreamingCommunity/Util/headers.py,sha256=RP3A6Gr8UB8VU6uzw_yDOjEKkIFKpi7Gi6_w2A
|
|
|
103
100
|
StreamingCommunity/Util/http_client.py,sha256=Z9537JZLoaPq3S9dfipe4nrWNL7QOyvxkqUlZHdSo40,6253
|
|
104
101
|
StreamingCommunity/Util/logger.py,sha256=9kGD6GmWj2pM8ADpJc85o7jm8DD0c5Aguqnq-9kmxos,3314
|
|
105
102
|
StreamingCommunity/Util/message.py,sha256=tstYQ9NxlfWupYkqPrOqOLqrKEb1iG5NsvIMNTUXXvA,1332
|
|
106
|
-
StreamingCommunity/Util/os.py,sha256=
|
|
103
|
+
StreamingCommunity/Util/os.py,sha256=VgKPcQxFTU_aCDpIw-T-z61xl9sCCAWZZdc0UZBieu8,17135
|
|
107
104
|
StreamingCommunity/Util/table.py,sha256=xXfgd09oIYSxpJwnnkPZdWJ0DcCihSqxfvYYAEo-YMA,9806
|
|
108
|
-
streamingcommunity-3.
|
|
109
|
-
streamingcommunity-3.
|
|
110
|
-
streamingcommunity-3.
|
|
111
|
-
streamingcommunity-3.
|
|
112
|
-
streamingcommunity-3.
|
|
113
|
-
streamingcommunity-3.
|
|
105
|
+
streamingcommunity-3.3.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
106
|
+
streamingcommunity-3.3.0.dist-info/METADATA,sha256=uD8xka-sTPeGZIh7ZQEtlVYFx3qf1w9whuHQIrY2TuQ,27468
|
|
107
|
+
streamingcommunity-3.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
108
|
+
streamingcommunity-3.3.0.dist-info/entry_points.txt,sha256=Qph9XYfDC8n4LfDLOSl6gJGlkb9eFb5f-JOr_Wb_5rk,67
|
|
109
|
+
streamingcommunity-3.3.0.dist-info/top_level.txt,sha256=YsOcxKP-WOhWpIWgBlh0coll9XUx7aqmRPT7kmt3fH0,19
|
|
110
|
+
streamingcommunity-3.3.0.dist-info/RECORD,,
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# 09.06.24
|
|
2
|
-
|
|
3
|
-
from urllib.parse import quote_plus
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# External library
|
|
7
|
-
from rich.console import Console
|
|
8
|
-
from rich.prompt import Prompt
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# Internal utilities
|
|
12
|
-
from StreamingCommunity.Api.Template import get_select_title
|
|
13
|
-
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
14
|
-
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# Logic class
|
|
18
|
-
from .site import title_search, media_search_manager, table_show_manager
|
|
19
|
-
from .film import download_film
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# Variable
|
|
23
|
-
indice = -1
|
|
24
|
-
_useFor = "Film"
|
|
25
|
-
_priority = 0
|
|
26
|
-
_engineDownload = "mp4"
|
|
27
|
-
_deprecate = True
|
|
28
|
-
|
|
29
|
-
msg = Prompt()
|
|
30
|
-
console = Console()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def process_search_result(select_title):
|
|
34
|
-
"""
|
|
35
|
-
Handles the search result and initiates the download for either a film or series.
|
|
36
|
-
"""
|
|
37
|
-
# !!! ADD TYPE DONT WORK FOR SERIE
|
|
38
|
-
download_film(select_title)
|
|
39
|
-
|
|
40
|
-
def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_item: dict = None):
|
|
41
|
-
"""
|
|
42
|
-
Main function of the application for search.
|
|
43
|
-
|
|
44
|
-
Parameters:
|
|
45
|
-
string_to_search (str, optional): String to search for
|
|
46
|
-
get_onylDatabase (bool, optional): If True, return only the database object
|
|
47
|
-
direct_item (dict, optional): Direct item to process (bypass search)
|
|
48
|
-
"""
|
|
49
|
-
if direct_item:
|
|
50
|
-
select_title = MediaItem(**direct_item)
|
|
51
|
-
process_search_result(select_title)
|
|
52
|
-
return
|
|
53
|
-
|
|
54
|
-
if string_to_search is None:
|
|
55
|
-
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{site_constant.SITE_NAME}").strip()
|
|
56
|
-
|
|
57
|
-
# Search on database
|
|
58
|
-
len_database = title_search(quote_plus(string_to_search))
|
|
59
|
-
|
|
60
|
-
## If only the database is needed, return the manager
|
|
61
|
-
if get_onlyDatabase:
|
|
62
|
-
return media_search_manager
|
|
63
|
-
|
|
64
|
-
if len_database > 0:
|
|
65
|
-
select_title = get_select_title(table_show_manager, media_search_manager,len_database)
|
|
66
|
-
process_search_result(select_title)
|
|
67
|
-
|
|
68
|
-
else:
|
|
69
|
-
|
|
70
|
-
# If no results are found, ask again
|
|
71
|
-
console.print(f"\n[red]Nothing matching was found for[white]: [purple]{string_to_search}")
|
|
72
|
-
search()
|