StreamingCommunity 2.9.9__tar.gz → 3.0.0__tar.gz
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-2.9.9/StreamingCommunity.egg-info → streamingcommunity-3.0.0}/PKG-INFO +1 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/1337xx/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/1337xx/site.py +6 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/site.py +6 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/site.py +63 -35
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +28 -24
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/site.py +6 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/cb01new/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/cb01new/site.py +7 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/ddlstreamitaly/site.py +6 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/guardaserie/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/guardaserie/site.py +7 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/film.py +1 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/series.py +1 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/site.py +9 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +1 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +1 -2
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/site.py +7 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/HLS/segments.py +7 -15
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/TOR/downloader.py +7 -14
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/capture.py +1 -5
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/util.py +48 -40
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/estimator.py +20 -33
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Upload/version.py +1 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/ffmpeg_installer.py +26 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/os.py +13 -15
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/global_search.py +1 -4
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/run.py +1 -4
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0/StreamingCommunity.egg-info}/PKG-INFO +1 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/setup.py +1 -1
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/LICENSE +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/MANIFEST.in +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/README.md +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/ddl.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/maxstream.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/mediapolisvod.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/supervideo.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/sweetpixel.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/vixcloud.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/1337xx/title.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/film.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/series.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/film.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/serie.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/film.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/serie.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/cb01new/film.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/ddlstreamitaly/series.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/guardaserie/series.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/film.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/series.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/Util/__init__.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/Util/manage_ep.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/__init__.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/config_loader.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/site.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/__init__.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/command.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/__init__.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/decryptor.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/parser.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/url_fixer.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/TMBD/__init__.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/TMBD/tmdb.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/TelegramHelp/telegram_bot.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Upload/update.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/color.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/config_json.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/headers.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/logger.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/message.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/table.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/__init__.py +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/SOURCES.txt +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/entry_points.txt +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/requires.txt +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/top_level.txt +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/requirements.txt +0 -0
- {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/setup.cfg +0 -0
{streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/1337xx/site.py
RENAMED
|
@@ -43,7 +43,12 @@ def title_search(query: str) -> int:
|
|
|
43
43
|
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
44
44
|
|
|
45
45
|
try:
|
|
46
|
-
response = httpx.get(
|
|
46
|
+
response = httpx.get(
|
|
47
|
+
search_url,
|
|
48
|
+
headers={'user-agent': get_userAgent()},
|
|
49
|
+
timeout=max_timeout,
|
|
50
|
+
follow_redirects=True
|
|
51
|
+
)
|
|
47
52
|
response.raise_for_status()
|
|
48
53
|
|
|
49
54
|
except Exception as e:
|
|
@@ -46,7 +46,12 @@ def title_search(query: str) -> int:
|
|
|
46
46
|
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
47
47
|
|
|
48
48
|
try:
|
|
49
|
-
response = httpx.post(
|
|
49
|
+
response = httpx.post(
|
|
50
|
+
search_url,
|
|
51
|
+
headers={'user-agent': get_userAgent()},
|
|
52
|
+
timeout=max_timeout,
|
|
53
|
+
follow_redirects=True
|
|
54
|
+
)
|
|
50
55
|
response.raise_for_status()
|
|
51
56
|
|
|
52
57
|
except Exception as e:
|
{streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/site.py
RENAMED
|
@@ -51,10 +51,8 @@ def get_token() -> dict:
|
|
|
51
51
|
|
|
52
52
|
for html_meta in soup.find_all("meta"):
|
|
53
53
|
if html_meta.get('name') == "csrf-token":
|
|
54
|
-
|
|
55
54
|
find_csrf_token = html_meta.get('content')
|
|
56
55
|
|
|
57
|
-
logging.info(f"Extract: ('animeunity_session': {response.cookies['animeunity_session']}, 'csrf_token': {find_csrf_token})")
|
|
58
56
|
return {
|
|
59
57
|
'animeunity_session': response.cookies['animeunity_session'],
|
|
60
58
|
'csrf_token': find_csrf_token
|
|
@@ -64,9 +62,6 @@ def get_token() -> dict:
|
|
|
64
62
|
def get_real_title(record):
|
|
65
63
|
"""
|
|
66
64
|
Get the real title from a record.
|
|
67
|
-
|
|
68
|
-
This function takes a record, which is assumed to be a dictionary representing a row of JSON data.
|
|
69
|
-
It looks for a title in the record, prioritizing English over Italian titles if available.
|
|
70
65
|
|
|
71
66
|
Parameters:
|
|
72
67
|
- record (dict): A dictionary representing a row of JSON data.
|
|
@@ -84,7 +79,7 @@ def get_real_title(record):
|
|
|
84
79
|
|
|
85
80
|
def title_search(query: str) -> int:
|
|
86
81
|
"""
|
|
87
|
-
Function to perform an anime search using
|
|
82
|
+
Function to perform an anime search using both APIs and combine results.
|
|
88
83
|
|
|
89
84
|
Parameters:
|
|
90
85
|
- query (str): The query to search for.
|
|
@@ -97,43 +92,85 @@ def title_search(query: str) -> int:
|
|
|
97
92
|
|
|
98
93
|
media_search_manager.clear()
|
|
99
94
|
table_show_manager.clear()
|
|
95
|
+
seen_titles = set()
|
|
96
|
+
choices = [] if site_constant.TELEGRAM_BOT else None
|
|
100
97
|
|
|
101
98
|
# Create parameter for request
|
|
102
99
|
data = get_token()
|
|
103
|
-
cookies = {
|
|
100
|
+
cookies = {
|
|
101
|
+
'animeunity_session': data.get('animeunity_session')
|
|
102
|
+
}
|
|
104
103
|
headers = {
|
|
105
104
|
'user-agent': get_userAgent(),
|
|
106
105
|
'x-csrf-token': data.get('csrf_token')
|
|
107
106
|
}
|
|
108
|
-
json_data = {'title': query}
|
|
109
107
|
|
|
110
|
-
#
|
|
108
|
+
# First API call - livesearch
|
|
109
|
+
try:
|
|
110
|
+
response1 = httpx.post(
|
|
111
|
+
f'{site_constant.FULL_URL}/livesearch',
|
|
112
|
+
cookies=cookies,
|
|
113
|
+
headers=headers,
|
|
114
|
+
json={'title': query},
|
|
115
|
+
timeout=max_timeout
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
response1.raise_for_status()
|
|
119
|
+
process_results(response1.json()['records'], seen_titles, media_search_manager, choices)
|
|
120
|
+
|
|
121
|
+
except Exception as e:
|
|
122
|
+
console.print(f"Site: {site_constant.SITE_NAME}, livesearch error: {e}")
|
|
123
|
+
|
|
124
|
+
# Second API call - archivio
|
|
111
125
|
try:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
126
|
+
json_data = {
|
|
127
|
+
'title': query,
|
|
128
|
+
'type': False,
|
|
129
|
+
'year': False,
|
|
130
|
+
'order': 'Lista A-Z',
|
|
131
|
+
'status': False,
|
|
132
|
+
'genres': False,
|
|
133
|
+
'offset': 0,
|
|
134
|
+
'dubbed': False,
|
|
135
|
+
'season': False
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
response2 = httpx.post(
|
|
139
|
+
f'{site_constant.FULL_URL}/archivio/get-animes',
|
|
140
|
+
cookies=cookies,
|
|
141
|
+
headers=headers,
|
|
116
142
|
json=json_data,
|
|
117
143
|
timeout=max_timeout
|
|
118
144
|
)
|
|
119
|
-
|
|
145
|
+
|
|
146
|
+
response2.raise_for_status()
|
|
147
|
+
process_results(response2.json()['records'], seen_titles, media_search_manager, choices)
|
|
120
148
|
|
|
121
149
|
except Exception as e:
|
|
122
|
-
console.print(f"Site: {site_constant.SITE_NAME},
|
|
123
|
-
return 0
|
|
150
|
+
console.print(f"Site: {site_constant.SITE_NAME}, archivio search error: {e}")
|
|
124
151
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
152
|
+
if site_constant.TELEGRAM_BOT and choices and len(choices) > 0:
|
|
153
|
+
bot.send_message(f"Lista dei risultati:", choices)
|
|
154
|
+
|
|
155
|
+
result_count = media_search_manager.get_length()
|
|
156
|
+
if result_count == 0:
|
|
157
|
+
console.print(f"Nothing matching was found for: {query}")
|
|
158
|
+
|
|
159
|
+
return result_count
|
|
128
160
|
|
|
129
|
-
|
|
161
|
+
def process_results(records: list, seen_titles: set, media_manager: MediaManager, choices: list = None) -> None:
|
|
162
|
+
"""Helper function to process search results and add unique entries."""
|
|
163
|
+
for dict_title in records:
|
|
130
164
|
try:
|
|
131
|
-
|
|
132
|
-
|
|
165
|
+
title_id = dict_title.get('id')
|
|
166
|
+
if title_id in seen_titles:
|
|
167
|
+
continue
|
|
168
|
+
|
|
169
|
+
seen_titles.add(title_id)
|
|
133
170
|
dict_title['name'] = get_real_title(dict_title)
|
|
134
171
|
|
|
135
|
-
|
|
136
|
-
'id':
|
|
172
|
+
media_manager.add_media({
|
|
173
|
+
'id': title_id,
|
|
137
174
|
'slug': dict_title.get('slug'),
|
|
138
175
|
'name': dict_title.get('name'),
|
|
139
176
|
'type': dict_title.get('type'),
|
|
@@ -142,18 +179,9 @@ def title_search(query: str) -> int:
|
|
|
142
179
|
'image': dict_title.get('imageurl')
|
|
143
180
|
})
|
|
144
181
|
|
|
145
|
-
if
|
|
146
|
-
|
|
147
|
-
# Crea una stringa formattata per ogni scelta con numero
|
|
182
|
+
if choices is not None:
|
|
148
183
|
choice_text = f"{len(choices)} - {dict_title.get('name')} ({dict_title.get('type')}) - Episodi: {dict_title.get('episodes_count')}"
|
|
149
184
|
choices.append(choice_text)
|
|
150
185
|
|
|
151
186
|
except Exception as e:
|
|
152
|
-
print(f"Error parsing a
|
|
153
|
-
|
|
154
|
-
if site_constant.TELEGRAM_BOT:
|
|
155
|
-
if choices:
|
|
156
|
-
bot.send_message(f"Lista dei risultati:", choices)
|
|
157
|
-
|
|
158
|
-
# Return the length of media search manager
|
|
159
|
-
return media_search_manager.get_length()
|
|
187
|
+
print(f"Error parsing a title entry: {e}")
|
|
@@ -29,6 +29,7 @@ class ScrapeSerieAnime:
|
|
|
29
29
|
self.is_series = False
|
|
30
30
|
self.headers = {'user-agent': get_userAgent()}
|
|
31
31
|
self.url = url
|
|
32
|
+
self.episodes_cache = None
|
|
32
33
|
|
|
33
34
|
def setup(self, version: str = None, media_id: int = None, series_name: str = None):
|
|
34
35
|
self.version = version
|
|
@@ -62,38 +63,41 @@ class ScrapeSerieAnime:
|
|
|
62
63
|
logging.error(f"Error fetching episode count: {e}")
|
|
63
64
|
return None
|
|
64
65
|
|
|
65
|
-
def
|
|
66
|
+
def _fetch_all_episodes(self):
|
|
66
67
|
"""
|
|
67
|
-
Fetch
|
|
68
|
-
|
|
69
|
-
Args:
|
|
70
|
-
index_ep (int): Zero-based index of the target episode
|
|
71
|
-
|
|
72
|
-
Returns:
|
|
73
|
-
Episode: Detailed episode information
|
|
68
|
+
Fetch all episodes data at once and cache it
|
|
74
69
|
"""
|
|
75
70
|
try:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"end_range": index_ep + 1
|
|
80
|
-
}
|
|
71
|
+
count = self.get_count_episodes()
|
|
72
|
+
if not count:
|
|
73
|
+
return
|
|
81
74
|
|
|
82
75
|
response = httpx.get(
|
|
83
|
-
url=f"{self.url}/info_api/{self.media_id}/
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
url=f"{self.url}/info_api/{self.media_id}/1",
|
|
77
|
+
params={
|
|
78
|
+
"start_range": 1,
|
|
79
|
+
"end_range": count
|
|
80
|
+
},
|
|
81
|
+
headers=self.headers,
|
|
86
82
|
timeout=max_timeout
|
|
87
83
|
)
|
|
88
84
|
response.raise_for_status()
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
json_data = response.json()["episodes"][-1]
|
|
92
|
-
return Episode(json_data)
|
|
93
|
-
|
|
85
|
+
|
|
86
|
+
self.episodes_cache = response.json()["episodes"]
|
|
94
87
|
except Exception as e:
|
|
95
|
-
logging.error(f"Error fetching
|
|
96
|
-
|
|
88
|
+
logging.error(f"Error fetching all episodes: {e}")
|
|
89
|
+
self.episodes_cache = None
|
|
90
|
+
|
|
91
|
+
def get_info_episode(self, index_ep: int) -> Episode:
|
|
92
|
+
"""
|
|
93
|
+
Get episode info from cache
|
|
94
|
+
"""
|
|
95
|
+
if self.episodes_cache is None:
|
|
96
|
+
self._fetch_all_episodes()
|
|
97
|
+
|
|
98
|
+
if self.episodes_cache and 0 <= index_ep < len(self.episodes_cache):
|
|
99
|
+
return Episode(self.episodes_cache[index_ep])
|
|
100
|
+
return None
|
|
97
101
|
|
|
98
102
|
|
|
99
103
|
# ------------- FOR GUI -------------
|
|
@@ -108,4 +112,4 @@ class ScrapeSerieAnime:
|
|
|
108
112
|
"""
|
|
109
113
|
Get information for a specific episode.
|
|
110
114
|
"""
|
|
111
|
-
return self.get_info_episode(episode_index)
|
|
115
|
+
return self.get_info_episode(episode_index)
|
{streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/site.py
RENAMED
|
@@ -70,7 +70,12 @@ def title_search(query: str) -> int:
|
|
|
70
70
|
|
|
71
71
|
# Make the GET request
|
|
72
72
|
try:
|
|
73
|
-
response = httpx.get(
|
|
73
|
+
response = httpx.get(
|
|
74
|
+
search_url,
|
|
75
|
+
headers={'User-Agent': get_userAgent()},
|
|
76
|
+
timeout=max_timeout,
|
|
77
|
+
verify=False
|
|
78
|
+
)
|
|
74
79
|
|
|
75
80
|
except Exception as e:
|
|
76
81
|
console.print(f"Site: {site_constant.SITE_NAME}, request search error: {e}")
|
{streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/cb01new/site.py
RENAMED
|
@@ -44,7 +44,13 @@ def title_search(query: str) -> int:
|
|
|
44
44
|
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
45
45
|
|
|
46
46
|
try:
|
|
47
|
-
response = httpx.get(
|
|
47
|
+
response = httpx.get(
|
|
48
|
+
search_url,
|
|
49
|
+
headers={'user-agent': get_userAgent()},
|
|
50
|
+
timeout=max_timeout,
|
|
51
|
+
follow_redirects=True,
|
|
52
|
+
verify=False
|
|
53
|
+
)
|
|
48
54
|
response.raise_for_status()
|
|
49
55
|
|
|
50
56
|
except Exception as e:
|
|
@@ -44,7 +44,12 @@ def title_search(query: str) -> int:
|
|
|
44
44
|
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
45
45
|
|
|
46
46
|
try:
|
|
47
|
-
response = httpx.get(
|
|
47
|
+
response = httpx.get(
|
|
48
|
+
search_url,
|
|
49
|
+
headers={'user-agent': get_userAgent()},
|
|
50
|
+
timeout=max_timeout,
|
|
51
|
+
follow_redirects=True
|
|
52
|
+
)
|
|
48
53
|
response.raise_for_status()
|
|
49
54
|
|
|
50
55
|
except Exception as e:
|
|
@@ -44,7 +44,13 @@ def title_search(query: str) -> int:
|
|
|
44
44
|
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
45
45
|
|
|
46
46
|
try:
|
|
47
|
-
response = httpx.get(
|
|
47
|
+
response = httpx.get(
|
|
48
|
+
search_url,
|
|
49
|
+
headers={'user-agent': get_userAgent()},
|
|
50
|
+
timeout=max_timeout,
|
|
51
|
+
follow_redirects=True,
|
|
52
|
+
verify=False
|
|
53
|
+
)
|
|
48
54
|
response.raise_for_status()
|
|
49
55
|
|
|
50
56
|
except Exception as e:
|
{streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/site.py
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 21.05.24
|
|
2
2
|
|
|
3
3
|
import threading
|
|
4
4
|
import queue
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
# External libraries
|
|
7
8
|
import httpx
|
|
8
9
|
from rich.console import Console
|
|
@@ -123,7 +124,13 @@ def title_search(query: str) -> int:
|
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
try:
|
|
126
|
-
response = httpx.post(
|
|
127
|
+
response = httpx.post(
|
|
128
|
+
search_url,
|
|
129
|
+
headers={'user-agent': get_userAgent()},
|
|
130
|
+
json=json_data,
|
|
131
|
+
timeout=max_timeout,
|
|
132
|
+
follow_redirects=True
|
|
133
|
+
)
|
|
127
134
|
response.raise_for_status()
|
|
128
135
|
|
|
129
136
|
except Exception as e:
|
|
@@ -45,7 +45,13 @@ def title_search(query: str) -> int:
|
|
|
45
45
|
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
46
46
|
|
|
47
47
|
try:
|
|
48
|
-
response = httpx.get(
|
|
48
|
+
response = httpx.get(
|
|
49
|
+
search_url,
|
|
50
|
+
headers={'user-agent': get_userAgent()},
|
|
51
|
+
timeout=max_timeout,
|
|
52
|
+
follow_redirects=True,
|
|
53
|
+
verify=False
|
|
54
|
+
)
|
|
49
55
|
response.raise_for_status()
|
|
50
56
|
|
|
51
57
|
except Exception as e:
|
|
@@ -23,7 +23,7 @@ from rich.console import Console
|
|
|
23
23
|
# Internal utilities
|
|
24
24
|
from StreamingCommunity.Util.color import Colors
|
|
25
25
|
from StreamingCommunity.Util.headers import get_userAgent
|
|
26
|
-
from StreamingCommunity.Util.config_json import config_manager
|
|
26
|
+
from StreamingCommunity.Util.config_json import config_manager
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
# Logic class
|
|
@@ -407,20 +407,12 @@ class M3U8_Segments:
|
|
|
407
407
|
"""
|
|
408
408
|
Generate platform-appropriate progress bar format.
|
|
409
409
|
"""
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
else:
|
|
418
|
-
return (
|
|
419
|
-
f"{Colors.YELLOW}[HLS] {Colors.WHITE}({Colors.CYAN}{description}{Colors.WHITE}): "
|
|
420
|
-
f"{Colors.RED}{{percentage:.2f}}% "
|
|
421
|
-
f"{Colors.MAGENTA}{{bar}} "
|
|
422
|
-
f"{Colors.YELLOW}{{elapsed}}{Colors.WHITE} < {Colors.CYAN}{{remaining}}{Colors.WHITE}{{postfix}}{Colors.WHITE}"
|
|
423
|
-
)
|
|
410
|
+
return (
|
|
411
|
+
f"{Colors.YELLOW}[HLS] {Colors.WHITE}({Colors.CYAN}{description}{Colors.WHITE}): "
|
|
412
|
+
f"{Colors.RED}{{percentage:.2f}}% "
|
|
413
|
+
f"{Colors.MAGENTA}{{bar}} "
|
|
414
|
+
f"{Colors.YELLOW}{{elapsed}}{Colors.WHITE} < {Colors.CYAN}{{remaining}}{Colors.WHITE}{{postfix}}{Colors.WHITE}"
|
|
415
|
+
)
|
|
424
416
|
|
|
425
417
|
def _get_worker_count(self, stream_type: str) -> int:
|
|
426
418
|
"""
|
|
@@ -18,7 +18,7 @@ import qbittorrentapi
|
|
|
18
18
|
# Internal utilities
|
|
19
19
|
from StreamingCommunity.Util.color import Colors
|
|
20
20
|
from StreamingCommunity.Util.os import internet_manager
|
|
21
|
-
from StreamingCommunity.Util.config_json import config_manager
|
|
21
|
+
from StreamingCommunity.Util.config_json import config_manager
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
# Configuration
|
|
@@ -316,19 +316,12 @@ class TOR_downloader:
|
|
|
316
316
|
# Ensure the torrent is started
|
|
317
317
|
self.qb.torrents_resume(torrent_hashes=self.latest_torrent_hash)
|
|
318
318
|
|
|
319
|
-
# Configure progress bar display format
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
)
|
|
326
|
-
else:
|
|
327
|
-
bar_format = (
|
|
328
|
-
f"{Colors.YELLOW}Proc{Colors.WHITE}: "
|
|
329
|
-
f"{Colors.RED}{{percentage:.2f}}% {Colors.WHITE}| "
|
|
330
|
-
f"{Colors.CYAN}{{remaining}}{{postfix}} {Colors.WHITE}]"
|
|
331
|
-
)
|
|
319
|
+
# Configure progress bar display format
|
|
320
|
+
bar_format = (
|
|
321
|
+
f"{Colors.YELLOW}[TOR] {Colors.WHITE}({Colors.CYAN}video{Colors.WHITE}): "
|
|
322
|
+
f"{Colors.RED}{{percentage:.2f}}% {Colors.MAGENTA}{{bar}} {Colors.WHITE}[ "
|
|
323
|
+
f"{Colors.YELLOW}{{elapsed}} {Colors.WHITE}< {Colors.CYAN}{{remaining}}{{postfix}} {Colors.WHITE}]"
|
|
324
|
+
)
|
|
332
325
|
|
|
333
326
|
# Initialize progress bar
|
|
334
327
|
with tqdm(
|
{streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/capture.py
RENAMED
|
@@ -36,11 +36,7 @@ def capture_output(process: subprocess.Popen, description: str) -> None:
|
|
|
36
36
|
if not line:
|
|
37
37
|
continue
|
|
38
38
|
|
|
39
|
-
logging.info(f"
|
|
40
|
-
|
|
41
|
-
# Capture only error
|
|
42
|
-
if "rror" in str(line):
|
|
43
|
-
console.log(f"[red]FFMPEG: {str(line).strip()}")
|
|
39
|
+
logging.info(f"CAPTURE ffmpeg line: {line}")
|
|
44
40
|
|
|
45
41
|
# Check if termination is requested
|
|
46
42
|
if terminate_flag.is_set():
|