StreamingCommunity 3.2.8__tar.gz → 3.3.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-3.2.8/StreamingCommunity.egg-info → streamingcommunity-3.3.0}/PKG-INFO +147 -45
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/README.md +147 -45
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +2 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/hdplayer.py +2 -2
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/sweetpixel.py +5 -8
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/altadefinizione/__init__.py +32 -15
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/altadefinizione/film.py +10 -8
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/altadefinizione/series.py +9 -7
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/altadefinizione/site.py +1 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeunity/__init__.py +31 -15
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeunity/serie.py +2 -2
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeworld/__init__.py +33 -7
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeworld/site.py +3 -5
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py +8 -10
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/crunchyroll/__init__.py +44 -12
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/crunchyroll/film.py +9 -7
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/crunchyroll/series.py +9 -7
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/crunchyroll/site.py +16 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/guardaserie/__init__.py +36 -10
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/guardaserie/series.py +8 -6
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/guardaserie/site.py +0 -3
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +1 -2
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/mediasetinfinity/__init__.py +37 -12
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/mediasetinfinity/film.py +10 -16
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/mediasetinfinity/series.py +12 -18
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/mediasetinfinity/site.py +18 -3
- streamingcommunity-3.3.0/StreamingCommunity/Api/Site/mediasetinfinity/util/ScrapeSerie.py +293 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/mediasetinfinity/util/get_license.py +2 -31
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/raiplay/__init__.py +47 -12
- streamingcommunity-3.3.0/StreamingCommunity/Api/Site/raiplay/film.py +97 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/raiplay/series.py +53 -11
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/raiplay/site.py +4 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +2 -1
- streamingcommunity-3.3.0/StreamingCommunity/Api/Site/raiplay/util/get_license.py +40 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +5 -8
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingcommunity/film.py +7 -5
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingcommunity/series.py +9 -7
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingcommunity/site.py +8 -3
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +5 -2
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingwatch/__init__.py +43 -9
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingwatch/film.py +7 -5
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingwatch/series.py +8 -6
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingwatch/site.py +3 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/streamingwatch/util/ScrapeSerie.py +3 -3
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Template/Util/__init__.py +10 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Template/Util/manage_ep.py +4 -4
- streamingcommunity-3.3.0/StreamingCommunity/Api/Template/__init__.py +7 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Template/site.py +10 -6
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/DASH/cdm_helpher.py +13 -12
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/DASH/decrypt.py +1 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/DASH/downloader.py +24 -22
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/DASH/parser.py +1 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/DASH/segments.py +4 -3
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +11 -9
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/HLS/segments.py +4 -9
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +25 -6
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/Downloader/TOR/downloader.py +3 -5
- streamingcommunity-3.3.0/StreamingCommunity/Lib/Downloader/__init__.py +13 -0
- streamingcommunity-3.3.0/StreamingCommunity/Lib/FFmpeg/__init__.py +13 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/FFmpeg/command.py +4 -6
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/FFmpeg/util.py +1 -1
- streamingcommunity-3.3.0/StreamingCommunity/Lib/M3U8/__init__.py +14 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/M3U8/decryptor.py +8 -4
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/M3U8/estimator.py +0 -6
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/M3U8/parser.py +1 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/M3U8/url_fixer.py +1 -1
- streamingcommunity-3.3.0/StreamingCommunity/Lib/TMBD/__init__.py +9 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/TelegramHelp/config.json +1 -5
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/TelegramHelp/telegram_bot.py +9 -10
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Upload/update.py +2 -2
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Upload/version.py +1 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/config_json.py +139 -59
- streamingcommunity-3.3.0/StreamingCommunity/Util/http_client.py +201 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/message.py +1 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/os.py +8 -5
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/table.py +3 -3
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/__init__.py +9 -1
- streamingcommunity-3.3.0/StreamingCommunity/run.py +549 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0/StreamingCommunity.egg-info}/PKG-INFO +147 -45
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity.egg-info/SOURCES.txt +2 -3
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/requirements.txt +1 -1
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/setup.py +2 -1
- streamingcommunity-3.2.8/StreamingCommunity/Api/Site/cb01new/__init__.py +0 -72
- streamingcommunity-3.2.8/StreamingCommunity/Api/Site/cb01new/film.py +0 -62
- streamingcommunity-3.2.8/StreamingCommunity/Api/Site/cb01new/site.py +0 -78
- streamingcommunity-3.2.8/StreamingCommunity/Api/Site/mediasetinfinity/util/ScrapeSerie.py +0 -259
- streamingcommunity-3.2.8/StreamingCommunity/Api/Site/raiplay/film.py +0 -65
- streamingcommunity-3.2.8/StreamingCommunity/Api/Template/__init__.py +0 -3
- streamingcommunity-3.2.8/StreamingCommunity/Lib/Downloader/__init__.py +0 -5
- streamingcommunity-3.2.8/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -4
- streamingcommunity-3.2.8/StreamingCommunity/Lib/M3U8/__init__.py +0 -6
- streamingcommunity-3.2.8/StreamingCommunity/Lib/TMBD/__init__.py +0 -4
- streamingcommunity-3.2.8/StreamingCommunity/run.py +0 -413
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/LICENSE +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/MANIFEST.in +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/ddl.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/maxstream.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/mediapolisvod.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/mixdrop.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/supervideo.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/vixcloud.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeunity/film.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeunity/site.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeworld/film.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/animeworld/serie.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/crunchyroll/util/ScrapeSerie.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/crunchyroll/util/get_license.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Site/mediasetinfinity/util/fix_mpd.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Template/config_loader.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/FFmpeg/capture.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Lib/TMBD/tmdb.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/bento4_installer.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/color.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/ffmpeg_installer.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/headers.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Util/logger.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/global_search.py +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity.egg-info/entry_points.txt +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity.egg-info/requires.txt +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity.egg-info/top_level.txt +0 -0
- {streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/setup.cfg +0 -0
|
@@ -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
|
|
@@ -38,14 +38,10 @@ Dynamic: requires-python
|
|
|
38
38
|
<div align="center">
|
|
39
39
|
|
|
40
40
|
## 📊 Project Status & Info
|
|
41
|
-
|
|
42
41
|
[](https://pypi.org/project/streamingcommunity)
|
|
43
|
-
[](https://pypi.org/project/streamingcommunity)
|
|
44
|
-
[](https://github.com/Arrowar/StreamingCommunity/blob/main/LICENSE)
|
|
45
|
-
|
|
46
|
-
[](https://github.com/Arrowar/StreamingCommunity)
|
|
47
42
|
[](https://github.com/Arrowar/StreamingCommunity/commits)
|
|
48
43
|
[](https://github.com/Arrowar/StreamingCommunity/issues)
|
|
44
|
+
[](https://github.com/Arrowar/StreamingCommunity/blob/main/LICENSE)
|
|
49
45
|
|
|
50
46
|
## 💝 Support the Project
|
|
51
47
|
|
|
@@ -97,6 +93,7 @@ Dynamic: requires-python
|
|
|
97
93
|
- 🔧 [Manual domain configuration](#update-domains)
|
|
98
94
|
- 🐳 [Docker](#docker)
|
|
99
95
|
- 📝 [Telegram Usage](#telegram-usage)
|
|
96
|
+
- 🧩 [Hook/Plugin System](#hookplugin-system)
|
|
100
97
|
</details>
|
|
101
98
|
|
|
102
99
|
<details>
|
|
@@ -216,6 +213,29 @@ client.start_download()
|
|
|
216
213
|
See [Torrent example](./Test/Download/TOR.py) for complete usage.
|
|
217
214
|
</details>
|
|
218
215
|
|
|
216
|
+
<details>
|
|
217
|
+
<summary>🎞️ DASH Downloader</summary>
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
license_url = "https://example.com/stream.mpd"
|
|
221
|
+
mpd_url = "https://example.com/get_license"
|
|
222
|
+
|
|
223
|
+
dash_process = DASH_Downloader(
|
|
224
|
+
cdm_device=get_wvd_path(),
|
|
225
|
+
license_url=license_url,
|
|
226
|
+
mpd_url=mpd_url,
|
|
227
|
+
output_path="output.mp4",
|
|
228
|
+
)
|
|
229
|
+
dash_process.parse_manifest()
|
|
230
|
+
|
|
231
|
+
if dash_process.download_and_decrypt():
|
|
232
|
+
dash_process.finalize_output()
|
|
233
|
+
|
|
234
|
+
dash_process.get_status()
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
</details>
|
|
238
|
+
|
|
219
239
|
## Binary Location
|
|
220
240
|
|
|
221
241
|
<details>
|
|
@@ -346,40 +366,113 @@ python3 update.py
|
|
|
346
366
|
<details>
|
|
347
367
|
<summary>🌐 Domain Configuration Methods</summary>
|
|
348
368
|
|
|
349
|
-
There are two ways to
|
|
369
|
+
There are two ways to manage the domains for the supported websites:
|
|
350
370
|
|
|
351
|
-
### 1.
|
|
371
|
+
### 1. Online Domain Fetching (Recommended)
|
|
352
372
|
|
|
353
|
-
|
|
373
|
+
Set `fetch_domain_online` to `true` in your `config.json`:
|
|
354
374
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
{
|
|
358
|
-
"
|
|
359
|
-
"domain": "si",
|
|
360
|
-
"full_url": "https://altadefinizione.si/"
|
|
361
|
-
},
|
|
362
|
-
...
|
|
375
|
+
```json
|
|
376
|
+
{
|
|
377
|
+
"DEFAULT": {
|
|
378
|
+
"fetch_domain_online": true
|
|
363
379
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
This will:
|
|
384
|
+
- Download the latest domains from the GitHub repository
|
|
385
|
+
- Automatically save them to a local `domains.json` file
|
|
386
|
+
- Ensure you always have the most up-to-date streaming site domains
|
|
387
|
+
|
|
388
|
+
### 2. Local Domain Configuration
|
|
389
|
+
|
|
390
|
+
Set `fetch_domain_online` to `false` to use a local configuration:
|
|
391
|
+
|
|
392
|
+
```json
|
|
393
|
+
{
|
|
394
|
+
"DEFAULT": {
|
|
395
|
+
"fetch_domain_online": false
|
|
372
396
|
}
|
|
373
|
-
|
|
397
|
+
}
|
|
398
|
+
```
|
|
374
399
|
|
|
375
|
-
|
|
400
|
+
Then create a `domains.json` file in the root directory with your domain configuration:
|
|
376
401
|
|
|
377
|
-
|
|
402
|
+
```json
|
|
403
|
+
{
|
|
404
|
+
"altadefinizione": {
|
|
405
|
+
"domain": "si",
|
|
406
|
+
"full_url": "https://altadefinizione.si/"
|
|
407
|
+
},
|
|
408
|
+
"streamingcommunity": {
|
|
409
|
+
"domain": "best",
|
|
410
|
+
"full_url": "https://streamingcommunity.best/"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
```
|
|
378
414
|
|
|
379
|
-
|
|
415
|
+
### 3. Automatic Fallback
|
|
380
416
|
|
|
381
|
-
|
|
382
|
-
|
|
417
|
+
If online fetching fails, the script will automatically attempt to use the local `domains.json` file as a fallback, ensuring maximum reliability.
|
|
418
|
+
|
|
419
|
+
#### 💡 Adding a New Site
|
|
420
|
+
If you want to request a new site to be added to the repository, message us on the Discord server!
|
|
421
|
+
|
|
422
|
+
</details>
|
|
423
|
+
|
|
424
|
+
## Hook/Plugin System
|
|
425
|
+
|
|
426
|
+
<details>
|
|
427
|
+
<summary>🧩 Run custom scripts before/after the main execution</summary>
|
|
428
|
+
|
|
429
|
+
Define pre/post hooks in `config.json` under the `HOOKS` section. Supported types:
|
|
430
|
+
|
|
431
|
+
- **python**: runs `script.py` with the current Python interpreter
|
|
432
|
+
- **bash/sh**: runs via `bash`/`sh` on macOS/Linux
|
|
433
|
+
- **bat/cmd**: runs via `cmd /c` on Windows
|
|
434
|
+
- Inline **command**: use `command` instead of `path`
|
|
435
|
+
|
|
436
|
+
Sample configuration:
|
|
437
|
+
|
|
438
|
+
```json
|
|
439
|
+
{
|
|
440
|
+
"HOOKS": {
|
|
441
|
+
"pre_run": [
|
|
442
|
+
{
|
|
443
|
+
"name": "prepare-env",
|
|
444
|
+
"type": "python",
|
|
445
|
+
"path": "scripts/prepare.py",
|
|
446
|
+
"args": ["--clean"],
|
|
447
|
+
"env": {"MY_FLAG": "1"},
|
|
448
|
+
"cwd": "~",
|
|
449
|
+
"os": ["linux", "darwin"],
|
|
450
|
+
"timeout": 60,
|
|
451
|
+
"enabled": true,
|
|
452
|
+
"continue_on_error": true
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
"post_run": [
|
|
456
|
+
{
|
|
457
|
+
"name": "notify",
|
|
458
|
+
"type": "bash",
|
|
459
|
+
"command": "echo 'Download completed'"
|
|
460
|
+
}
|
|
461
|
+
]
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
Notes:
|
|
467
|
+
|
|
468
|
+
- **os**: optional OS filter (`windows`, `darwin` (`darwin` is used for MacOS), `linux`).
|
|
469
|
+
- **args**: list of arguments passed to the script.
|
|
470
|
+
- **env**: additional environment variables.
|
|
471
|
+
- **cwd**: working directory for the script; supports `~` and environment variables.
|
|
472
|
+
- **continue_on_error**: if `false`, the app stops when the hook fails.
|
|
473
|
+
- **timeout**: in seconds; when exceeded the hook fails.
|
|
474
|
+
|
|
475
|
+
Hooks are executed automatically by `run.py` before (`pre_run`) and after (`post_run`) the main execution.
|
|
383
476
|
|
|
384
477
|
</details>
|
|
385
478
|
|
|
@@ -399,12 +492,9 @@ You can change some behaviors by tweaking the configuration file. The configurat
|
|
|
399
492
|
"DEFAULT": {
|
|
400
493
|
"debug": false,
|
|
401
494
|
"show_message": true,
|
|
402
|
-
"clean_console": true,
|
|
403
495
|
"show_trending": true,
|
|
404
|
-
"
|
|
405
|
-
"not_close": false,
|
|
496
|
+
"fetch_domain_online": true,
|
|
406
497
|
"telegram_bot": false,
|
|
407
|
-
"download_site_data": false,
|
|
408
498
|
"validate_github_config": false
|
|
409
499
|
}
|
|
410
500
|
}
|
|
@@ -412,13 +502,9 @@ You can change some behaviors by tweaking the configuration file. The configurat
|
|
|
412
502
|
|
|
413
503
|
- `debug`: Enables debug logging
|
|
414
504
|
- `show_message`: Displays informational messages
|
|
415
|
-
- `clean_console`: Clears the console between operations
|
|
416
505
|
- `show_trending`: Shows trending content
|
|
417
|
-
- `
|
|
418
|
-
- `not_close`: If set to true, keeps the program running after download is complete
|
|
419
|
-
* Can be changed from terminal with `--not_close true/false`
|
|
506
|
+
- `fetch_domain_online`: If true, downloads domains from GitHub repository and saves to local file; if false, uses existing local domains.json file
|
|
420
507
|
- `telegram_bot`: Enables Telegram bot integration
|
|
421
|
-
- `download_site_data`: If set to false, disables automatic site data download
|
|
422
508
|
- `validate_github_config`: If set to false, disables validation and updating of configuration from GitHub
|
|
423
509
|
</details>
|
|
424
510
|
|
|
@@ -630,8 +716,7 @@ Note: Requires updated drivers and FFmpeg with hardware acceleration support.
|
|
|
630
716
|
```json
|
|
631
717
|
{
|
|
632
718
|
"M3U8_PARSER": {
|
|
633
|
-
"force_resolution": "Best"
|
|
634
|
-
"get_only_link": false
|
|
719
|
+
"force_resolution": "Best"
|
|
635
720
|
}
|
|
636
721
|
}
|
|
637
722
|
```
|
|
@@ -651,8 +736,6 @@ Note: Requires updated drivers and FFmpeg with hardware acceleration support.
|
|
|
651
736
|
- 240p (320x240)
|
|
652
737
|
- 144p (256x144)
|
|
653
738
|
|
|
654
|
-
#### Link Options
|
|
655
|
-
- `get_only_link`: Return M3U8 playlist/index URL instead of downloading
|
|
656
739
|
</details>
|
|
657
740
|
|
|
658
741
|
# Global Search
|
|
@@ -700,6 +783,18 @@ The Global Search can be configured from the command line:
|
|
|
700
783
|
# Examples of terminal usage
|
|
701
784
|
|
|
702
785
|
```bash
|
|
786
|
+
# Run a specific site by name with a search term
|
|
787
|
+
python test_run.py --site streamingcommunity --search "interstellar"
|
|
788
|
+
|
|
789
|
+
# Run a specific site by numeric index (as shown in -h help)
|
|
790
|
+
python test_run.py --site 0 --search "interstellar"
|
|
791
|
+
|
|
792
|
+
# Auto-download the first result from search (requires --site and --search)
|
|
793
|
+
python test_run.py --site streamingcommunity --search "interstellar" --auto-first
|
|
794
|
+
|
|
795
|
+
# Show help (includes available sites by name and by index)
|
|
796
|
+
python test_run.py -h
|
|
797
|
+
|
|
703
798
|
# Change video and audio workers
|
|
704
799
|
python test_run.py --default_video_worker 8 --default_audio_worker 8
|
|
705
800
|
|
|
@@ -709,7 +804,7 @@ python test_run.py --specific_list_audio ita,eng --specific_list_subtitles eng,s
|
|
|
709
804
|
# Keep console open after download
|
|
710
805
|
python test_run.py --not_close true
|
|
711
806
|
|
|
712
|
-
# Use global
|
|
807
|
+
# Use global search
|
|
713
808
|
python test_run.py --global -s "cars"
|
|
714
809
|
|
|
715
810
|
# Select specific category
|
|
@@ -717,6 +812,9 @@ python test_run.py --category 1 # Search in anime category
|
|
|
717
812
|
python test_run.py --category 2 # Search in movies & series
|
|
718
813
|
python test_run.py --category 3 # Search in series
|
|
719
814
|
python test_run.py --category 4 # Search in torrent category
|
|
815
|
+
|
|
816
|
+
# If installed via pip, you can also use the entrypoint directly
|
|
817
|
+
streamingcommunity --site streamingcommunity --search "interstellar" --auto-first
|
|
720
818
|
```
|
|
721
819
|
|
|
722
820
|
# Docker
|
|
@@ -808,6 +906,10 @@ python3 telegram_bot.py
|
|
|
808
906
|
```
|
|
809
907
|
</details>
|
|
810
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
|
+
|
|
811
913
|
# Tutorials
|
|
812
914
|
|
|
813
915
|
- [Windows](https://www.youtube.com/watch?v=mZGqK4wdN-k)
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
## 📊 Project Status & Info
|
|
4
|
-
|
|
5
4
|
[](https://pypi.org/project/streamingcommunity)
|
|
6
|
-
[](https://pypi.org/project/streamingcommunity)
|
|
7
|
-
[](https://github.com/Arrowar/StreamingCommunity/blob/main/LICENSE)
|
|
8
|
-
|
|
9
|
-
[](https://github.com/Arrowar/StreamingCommunity)
|
|
10
5
|
[](https://github.com/Arrowar/StreamingCommunity/commits)
|
|
11
6
|
[](https://github.com/Arrowar/StreamingCommunity/issues)
|
|
7
|
+
[](https://github.com/Arrowar/StreamingCommunity/blob/main/LICENSE)
|
|
12
8
|
|
|
13
9
|
## 💝 Support the Project
|
|
14
10
|
|
|
@@ -60,6 +56,7 @@
|
|
|
60
56
|
- 🔧 [Manual domain configuration](#update-domains)
|
|
61
57
|
- 🐳 [Docker](#docker)
|
|
62
58
|
- 📝 [Telegram Usage](#telegram-usage)
|
|
59
|
+
- 🧩 [Hook/Plugin System](#hookplugin-system)
|
|
63
60
|
</details>
|
|
64
61
|
|
|
65
62
|
<details>
|
|
@@ -179,6 +176,29 @@ client.start_download()
|
|
|
179
176
|
See [Torrent example](./Test/Download/TOR.py) for complete usage.
|
|
180
177
|
</details>
|
|
181
178
|
|
|
179
|
+
<details>
|
|
180
|
+
<summary>🎞️ DASH Downloader</summary>
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
license_url = "https://example.com/stream.mpd"
|
|
184
|
+
mpd_url = "https://example.com/get_license"
|
|
185
|
+
|
|
186
|
+
dash_process = DASH_Downloader(
|
|
187
|
+
cdm_device=get_wvd_path(),
|
|
188
|
+
license_url=license_url,
|
|
189
|
+
mpd_url=mpd_url,
|
|
190
|
+
output_path="output.mp4",
|
|
191
|
+
)
|
|
192
|
+
dash_process.parse_manifest()
|
|
193
|
+
|
|
194
|
+
if dash_process.download_and_decrypt():
|
|
195
|
+
dash_process.finalize_output()
|
|
196
|
+
|
|
197
|
+
dash_process.get_status()
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
</details>
|
|
201
|
+
|
|
182
202
|
## Binary Location
|
|
183
203
|
|
|
184
204
|
<details>
|
|
@@ -309,40 +329,113 @@ python3 update.py
|
|
|
309
329
|
<details>
|
|
310
330
|
<summary>🌐 Domain Configuration Methods</summary>
|
|
311
331
|
|
|
312
|
-
There are two ways to
|
|
332
|
+
There are two ways to manage the domains for the supported websites:
|
|
313
333
|
|
|
314
|
-
### 1.
|
|
334
|
+
### 1. Online Domain Fetching (Recommended)
|
|
315
335
|
|
|
316
|
-
|
|
336
|
+
Set `fetch_domain_online` to `true` in your `config.json`:
|
|
317
337
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
"
|
|
322
|
-
"domain": "si",
|
|
323
|
-
"full_url": "https://altadefinizione.si/"
|
|
324
|
-
},
|
|
325
|
-
...
|
|
338
|
+
```json
|
|
339
|
+
{
|
|
340
|
+
"DEFAULT": {
|
|
341
|
+
"fetch_domain_online": true
|
|
326
342
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
343
|
+
}
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
This will:
|
|
347
|
+
- Download the latest domains from the GitHub repository
|
|
348
|
+
- Automatically save them to a local `domains.json` file
|
|
349
|
+
- Ensure you always have the most up-to-date streaming site domains
|
|
350
|
+
|
|
351
|
+
### 2. Local Domain Configuration
|
|
352
|
+
|
|
353
|
+
Set `fetch_domain_online` to `false` to use a local configuration:
|
|
354
|
+
|
|
355
|
+
```json
|
|
356
|
+
{
|
|
357
|
+
"DEFAULT": {
|
|
358
|
+
"fetch_domain_online": false
|
|
335
359
|
}
|
|
336
|
-
|
|
360
|
+
}
|
|
361
|
+
```
|
|
337
362
|
|
|
338
|
-
|
|
363
|
+
Then create a `domains.json` file in the root directory with your domain configuration:
|
|
339
364
|
|
|
340
|
-
|
|
365
|
+
```json
|
|
366
|
+
{
|
|
367
|
+
"altadefinizione": {
|
|
368
|
+
"domain": "si",
|
|
369
|
+
"full_url": "https://altadefinizione.si/"
|
|
370
|
+
},
|
|
371
|
+
"streamingcommunity": {
|
|
372
|
+
"domain": "best",
|
|
373
|
+
"full_url": "https://streamingcommunity.best/"
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
```
|
|
341
377
|
|
|
342
|
-
|
|
378
|
+
### 3. Automatic Fallback
|
|
343
379
|
|
|
344
|
-
|
|
345
|
-
|
|
380
|
+
If online fetching fails, the script will automatically attempt to use the local `domains.json` file as a fallback, ensuring maximum reliability.
|
|
381
|
+
|
|
382
|
+
#### 💡 Adding a New Site
|
|
383
|
+
If you want to request a new site to be added to the repository, message us on the Discord server!
|
|
384
|
+
|
|
385
|
+
</details>
|
|
386
|
+
|
|
387
|
+
## Hook/Plugin System
|
|
388
|
+
|
|
389
|
+
<details>
|
|
390
|
+
<summary>🧩 Run custom scripts before/after the main execution</summary>
|
|
391
|
+
|
|
392
|
+
Define pre/post hooks in `config.json` under the `HOOKS` section. Supported types:
|
|
393
|
+
|
|
394
|
+
- **python**: runs `script.py` with the current Python interpreter
|
|
395
|
+
- **bash/sh**: runs via `bash`/`sh` on macOS/Linux
|
|
396
|
+
- **bat/cmd**: runs via `cmd /c` on Windows
|
|
397
|
+
- Inline **command**: use `command` instead of `path`
|
|
398
|
+
|
|
399
|
+
Sample configuration:
|
|
400
|
+
|
|
401
|
+
```json
|
|
402
|
+
{
|
|
403
|
+
"HOOKS": {
|
|
404
|
+
"pre_run": [
|
|
405
|
+
{
|
|
406
|
+
"name": "prepare-env",
|
|
407
|
+
"type": "python",
|
|
408
|
+
"path": "scripts/prepare.py",
|
|
409
|
+
"args": ["--clean"],
|
|
410
|
+
"env": {"MY_FLAG": "1"},
|
|
411
|
+
"cwd": "~",
|
|
412
|
+
"os": ["linux", "darwin"],
|
|
413
|
+
"timeout": 60,
|
|
414
|
+
"enabled": true,
|
|
415
|
+
"continue_on_error": true
|
|
416
|
+
}
|
|
417
|
+
],
|
|
418
|
+
"post_run": [
|
|
419
|
+
{
|
|
420
|
+
"name": "notify",
|
|
421
|
+
"type": "bash",
|
|
422
|
+
"command": "echo 'Download completed'"
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Notes:
|
|
430
|
+
|
|
431
|
+
- **os**: optional OS filter (`windows`, `darwin` (`darwin` is used for MacOS), `linux`).
|
|
432
|
+
- **args**: list of arguments passed to the script.
|
|
433
|
+
- **env**: additional environment variables.
|
|
434
|
+
- **cwd**: working directory for the script; supports `~` and environment variables.
|
|
435
|
+
- **continue_on_error**: if `false`, the app stops when the hook fails.
|
|
436
|
+
- **timeout**: in seconds; when exceeded the hook fails.
|
|
437
|
+
|
|
438
|
+
Hooks are executed automatically by `run.py` before (`pre_run`) and after (`post_run`) the main execution.
|
|
346
439
|
|
|
347
440
|
</details>
|
|
348
441
|
|
|
@@ -362,12 +455,9 @@ You can change some behaviors by tweaking the configuration file. The configurat
|
|
|
362
455
|
"DEFAULT": {
|
|
363
456
|
"debug": false,
|
|
364
457
|
"show_message": true,
|
|
365
|
-
"clean_console": true,
|
|
366
458
|
"show_trending": true,
|
|
367
|
-
"
|
|
368
|
-
"not_close": false,
|
|
459
|
+
"fetch_domain_online": true,
|
|
369
460
|
"telegram_bot": false,
|
|
370
|
-
"download_site_data": false,
|
|
371
461
|
"validate_github_config": false
|
|
372
462
|
}
|
|
373
463
|
}
|
|
@@ -375,13 +465,9 @@ You can change some behaviors by tweaking the configuration file. The configurat
|
|
|
375
465
|
|
|
376
466
|
- `debug`: Enables debug logging
|
|
377
467
|
- `show_message`: Displays informational messages
|
|
378
|
-
- `clean_console`: Clears the console between operations
|
|
379
468
|
- `show_trending`: Shows trending content
|
|
380
|
-
- `
|
|
381
|
-
- `not_close`: If set to true, keeps the program running after download is complete
|
|
382
|
-
* Can be changed from terminal with `--not_close true/false`
|
|
469
|
+
- `fetch_domain_online`: If true, downloads domains from GitHub repository and saves to local file; if false, uses existing local domains.json file
|
|
383
470
|
- `telegram_bot`: Enables Telegram bot integration
|
|
384
|
-
- `download_site_data`: If set to false, disables automatic site data download
|
|
385
471
|
- `validate_github_config`: If set to false, disables validation and updating of configuration from GitHub
|
|
386
472
|
</details>
|
|
387
473
|
|
|
@@ -593,8 +679,7 @@ Note: Requires updated drivers and FFmpeg with hardware acceleration support.
|
|
|
593
679
|
```json
|
|
594
680
|
{
|
|
595
681
|
"M3U8_PARSER": {
|
|
596
|
-
"force_resolution": "Best"
|
|
597
|
-
"get_only_link": false
|
|
682
|
+
"force_resolution": "Best"
|
|
598
683
|
}
|
|
599
684
|
}
|
|
600
685
|
```
|
|
@@ -614,8 +699,6 @@ Note: Requires updated drivers and FFmpeg with hardware acceleration support.
|
|
|
614
699
|
- 240p (320x240)
|
|
615
700
|
- 144p (256x144)
|
|
616
701
|
|
|
617
|
-
#### Link Options
|
|
618
|
-
- `get_only_link`: Return M3U8 playlist/index URL instead of downloading
|
|
619
702
|
</details>
|
|
620
703
|
|
|
621
704
|
# Global Search
|
|
@@ -663,6 +746,18 @@ The Global Search can be configured from the command line:
|
|
|
663
746
|
# Examples of terminal usage
|
|
664
747
|
|
|
665
748
|
```bash
|
|
749
|
+
# Run a specific site by name with a search term
|
|
750
|
+
python test_run.py --site streamingcommunity --search "interstellar"
|
|
751
|
+
|
|
752
|
+
# Run a specific site by numeric index (as shown in -h help)
|
|
753
|
+
python test_run.py --site 0 --search "interstellar"
|
|
754
|
+
|
|
755
|
+
# Auto-download the first result from search (requires --site and --search)
|
|
756
|
+
python test_run.py --site streamingcommunity --search "interstellar" --auto-first
|
|
757
|
+
|
|
758
|
+
# Show help (includes available sites by name and by index)
|
|
759
|
+
python test_run.py -h
|
|
760
|
+
|
|
666
761
|
# Change video and audio workers
|
|
667
762
|
python test_run.py --default_video_worker 8 --default_audio_worker 8
|
|
668
763
|
|
|
@@ -672,7 +767,7 @@ python test_run.py --specific_list_audio ita,eng --specific_list_subtitles eng,s
|
|
|
672
767
|
# Keep console open after download
|
|
673
768
|
python test_run.py --not_close true
|
|
674
769
|
|
|
675
|
-
# Use global
|
|
770
|
+
# Use global search
|
|
676
771
|
python test_run.py --global -s "cars"
|
|
677
772
|
|
|
678
773
|
# Select specific category
|
|
@@ -680,6 +775,9 @@ python test_run.py --category 1 # Search in anime category
|
|
|
680
775
|
python test_run.py --category 2 # Search in movies & series
|
|
681
776
|
python test_run.py --category 3 # Search in series
|
|
682
777
|
python test_run.py --category 4 # Search in torrent category
|
|
778
|
+
|
|
779
|
+
# If installed via pip, you can also use the entrypoint directly
|
|
780
|
+
streamingcommunity --site streamingcommunity --search "interstellar" --auto-first
|
|
683
781
|
```
|
|
684
782
|
|
|
685
783
|
# Docker
|
|
@@ -771,6 +869,10 @@ python3 telegram_bot.py
|
|
|
771
869
|
```
|
|
772
870
|
</details>
|
|
773
871
|
|
|
872
|
+
# SITE_LOGIN key
|
|
873
|
+
To use some site, you may need a SITE_LOGIN key.
|
|
874
|
+
See [guide.md](.github/.site/guide.md) for instructions on how to obtain it.
|
|
875
|
+
|
|
774
876
|
# Tutorials
|
|
775
877
|
|
|
776
878
|
- [Windows](https://www.youtube.com/watch?v=mZGqK4wdN-k)
|
|
@@ -799,4 +901,4 @@ API non ufficiale per accedere ai contenuti del sito italiano StreamingCommunity
|
|
|
799
901
|
|
|
800
902
|
This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
|
|
801
903
|
|
|
802
|
-
> **Note:** DASH downloads require a valid L3 CDM (Content Decryption Module) to proceed. This project does not provide, include, or facilitate obtaining any CDM. Users are responsible for ensuring compliance with all applicable laws and requirements regarding DRM and decryption modules.
|
|
904
|
+
> **Note:** DASH downloads require a valid L3 CDM (Content Decryption Module) to proceed. This project does not provide, include, or facilitate obtaining any CDM. Users are responsible for ensuring compliance with all applicable laws and requirements regarding DRM and decryption modules.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 23.11.24
|
|
2
2
|
|
|
3
|
-
from typing import Dict, Any, List,
|
|
3
|
+
from typing import Dict, Any, List, Optional
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class Episode:
|
|
@@ -12,6 +12,7 @@ class Episode:
|
|
|
12
12
|
self.name: str = data.get('name', '')
|
|
13
13
|
self.duration: int = data.get('duration', 0)
|
|
14
14
|
self.url: str = data.get('url', '')
|
|
15
|
+
self.mpd_id: str = data.get('mpd_id', '')
|
|
15
16
|
|
|
16
17
|
def __str__(self):
|
|
17
18
|
return f"Episode(id={self.id}, number={self.number}, name='{self.name}', duration={self.duration} sec)"
|
{streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/hdplayer.py
RENAMED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import re
|
|
4
4
|
|
|
5
5
|
# External library
|
|
6
|
-
import httpx
|
|
7
6
|
from bs4 import BeautifulSoup
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
# Internal utilities
|
|
11
10
|
from StreamingCommunity.Util.headers import get_userAgent
|
|
11
|
+
from StreamingCommunity.Util.http_client import create_client
|
|
12
12
|
from StreamingCommunity.Util.config_json import config_manager
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ REQUEST_VERIFY = config_manager.get_bool('REQUESTS', 'verify')
|
|
|
19
19
|
|
|
20
20
|
class VideoSource:
|
|
21
21
|
def __init__(self):
|
|
22
|
-
self.client =
|
|
22
|
+
self.client = create_client(headers={'user-agent': get_userAgent()})
|
|
23
23
|
|
|
24
24
|
def extractLinkHdPlayer(self, response):
|
|
25
25
|
"""Extract iframe source from the page."""
|
{streamingcommunity-3.2.8 → streamingcommunity-3.3.0}/StreamingCommunity/Api/Player/sweetpixel.py
RENAMED
|
@@ -4,12 +4,12 @@ import logging
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
# External libraries
|
|
7
|
-
import httpx
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
# Internal utilities
|
|
11
10
|
from StreamingCommunity.Util.config_json import config_manager
|
|
12
11
|
from StreamingCommunity.Util.headers import get_userAgent
|
|
12
|
+
from StreamingCommunity.Util.http_client import create_client
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
# Variable
|
|
@@ -17,21 +17,18 @@ MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
|
|
|
17
17
|
REQUEST_VERIFY = config_manager.get_bool('REQUESTS', 'verify')
|
|
18
18
|
|
|
19
19
|
class VideoSource:
|
|
20
|
-
def __init__(self,
|
|
20
|
+
def __init__(self, site_url, episode_data, session_id, csrf_token):
|
|
21
21
|
"""Initialize the VideoSource with session details, episode data, and URL."""
|
|
22
22
|
self.session_id = session_id
|
|
23
23
|
self.csrf_token = csrf_token
|
|
24
24
|
self.episode_data = episode_data
|
|
25
25
|
self.number = episode_data['number']
|
|
26
|
-
self.link = episode_data['link']
|
|
26
|
+
self.link = site_url + episode_data['link']
|
|
27
27
|
|
|
28
28
|
# Create an HTTP client with session cookies, headers, and base URL.
|
|
29
|
-
self.client =
|
|
29
|
+
self.client = create_client(
|
|
30
30
|
cookies={"sessionId": session_id},
|
|
31
|
-
headers={"User-Agent": get_userAgent(), "csrf-token": csrf_token}
|
|
32
|
-
base_url=full_url,
|
|
33
|
-
timeout=MAX_TIMEOUT,
|
|
34
|
-
verify=REQUEST_VERIFY
|
|
31
|
+
headers={"User-Agent": get_userAgent(), "csrf-token": csrf_token}
|
|
35
32
|
)
|
|
36
33
|
|
|
37
34
|
def get_playlist(self):
|