StreamingCommunity 2.5.6__tar.gz → 2.5.8__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.5.6/StreamingCommunity.egg-info → StreamingCommunity-2.5.8}/PKG-INFO +56 -22
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/README.md +55 -21
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Player/ddl.py +2 -3
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/1337xx/__init__.py +5 -6
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/1337xx/site.py +7 -14
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/1337xx/title.py +3 -5
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/altadefinizionegratis/__init__.py +7 -6
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/altadefinizionegratis/film.py +14 -19
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/altadefinizionegratis/site.py +6 -14
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/animeunity/__init__.py +7 -7
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/animeunity/film_serie.py +29 -31
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/animeunity/site.py +14 -22
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/cb01new/__init__.py +5 -4
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/cb01new/film.py +2 -5
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/cb01new/site.py +5 -13
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +5 -4
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/ddlstreamitaly/series.py +12 -49
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/ddlstreamitaly/site.py +6 -16
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +2 -3
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/guardaserie/__init__.py +5 -4
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/guardaserie/series.py +12 -46
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/guardaserie/site.py +5 -13
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +10 -14
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/ilcorsaronero/__init__.py +5 -4
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/ilcorsaronero/site.py +5 -13
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/ilcorsaronero/title.py +3 -5
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/mostraguarda/__init__.py +2 -2
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/mostraguarda/film.py +4 -8
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +8 -7
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/streamingcommunity/film.py +14 -18
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/streamingcommunity/series.py +25 -76
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/streamingcommunity/site.py +11 -23
- StreamingCommunity-2.5.8/StreamingCommunity/Api/Template/Util/__init__.py +12 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Template/Util/manage_ep.py +46 -2
- StreamingCommunity-2.5.8/StreamingCommunity/Api/Template/config_loader.py +71 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +60 -60
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/Downloader/HLS/segments.py +40 -15
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +47 -40
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/FFmpeg/command.py +59 -3
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/M3U8/estimator.py +10 -12
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/M3U8/parser.py +12 -51
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/TMBD/tmdb.py +66 -99
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/TelegramHelp/telegram_bot.py +222 -68
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Util/_jsonConfig.py +14 -13
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Util/ffmpeg_installer.py +70 -64
- StreamingCommunity-2.5.8/StreamingCommunity/Util/headers.py +49 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Util/os.py +65 -56
- StreamingCommunity-2.5.8/StreamingCommunity/Util/table.py +226 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/run.py +16 -11
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8/StreamingCommunity.egg-info}/PKG-INFO +56 -22
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity.egg-info/SOURCES.txt +1 -11
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity.egg-info/requires.txt +1 -1
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/setup.py +1 -1
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/1337xx/costant.py +0 -15
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/altadefinizionegratis/costant.py +0 -21
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/animeunity/costant.py +0 -21
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/cb01new/costant.py +0 -19
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/ddlstreamitaly/costant.py +0 -20
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/guardaserie/costant.py +0 -19
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/ilcorsaronero/costant.py +0 -19
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/mostraguarda/costant.py +0 -19
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Site/streamingcommunity/costant.py +0 -21
- StreamingCommunity-2.5.6/StreamingCommunity/Api/Template/Util/__init__.py +0 -5
- StreamingCommunity-2.5.6/StreamingCommunity/TelegramHelp/request_manager.py +0 -82
- StreamingCommunity-2.5.6/StreamingCommunity/TelegramHelp/session.py +0 -56
- StreamingCommunity-2.5.6/StreamingCommunity/Util/headers.py +0 -160
- StreamingCommunity-2.5.6/StreamingCommunity/Util/table.py +0 -272
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/LICENSE +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/MANIFEST.in +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Player/maxstream.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Player/supervideo.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Player/vixcloud.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Template/Util/get_domain.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Template/Util/recall_search.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Template/__init__.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Template/site.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/Downloader/HLS/proxyes.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/Downloader/TOR/downloader.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/Downloader/__init__.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/FFmpeg/capture.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/FFmpeg/util.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/M3U8/__init__.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/M3U8/decryptor.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/M3U8/url_fixer.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/TMBD/__init__.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Upload/update.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Upload/version.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Util/call_stack.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Util/color.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Util/console.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Util/logger.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Util/message.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/__init__.py +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity.egg-info/entry_points.txt +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity.egg-info/top_level.txt +0 -0
- {StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: StreamingCommunity
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.8
|
|
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
|
|
@@ -37,7 +37,7 @@ License-File: LICENSE
|
|
|
37
37
|
<img src="https://img.shields.io/pypi/dm/streamingcommunity?style=for-the-badge" alt="PyPI Downloads"/>
|
|
38
38
|
</a>
|
|
39
39
|
<a href="https://github.com/Arrowar/StreamingCommunity">
|
|
40
|
-
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Arrowar/StreamingCommunity/main/
|
|
40
|
+
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Arrowar/StreamingCommunity/main/.github/media/loc-badge.json&style=for-the-badge" alt="Lines of Code"/>
|
|
41
41
|
</a>
|
|
42
42
|
</p>
|
|
43
43
|
|
|
@@ -65,16 +65,19 @@ License-File: LICENSE
|
|
|
65
65
|
- 💬 [Support](#support)
|
|
66
66
|
- 🤝 [Contribute](#contributing)
|
|
67
67
|
- ⚠️ [Disclaimer](#disclaimer)
|
|
68
|
-
- ⚡ [Contributors](#contributors)
|
|
68
|
+
- ⚡ [Contributors](#contributors)
|
|
69
69
|
|
|
70
70
|
# Installation
|
|
71
71
|
|
|
72
72
|
<p align="center">
|
|
73
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/
|
|
74
|
-
<img src="https://img.shields.io/badge/-
|
|
73
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe">
|
|
74
|
+
<img src="https://img.shields.io/badge/-Windows-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
|
|
75
75
|
</a>
|
|
76
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/
|
|
77
|
-
<img src="https://img.shields.io/badge/-
|
|
76
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac">
|
|
77
|
+
<img src="https://img.shields.io/badge/-macOS-black.svg?style=for-the-badge&logo=apple" alt="macOS">
|
|
78
|
+
</a>
|
|
79
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux">
|
|
80
|
+
<img src="https://img.shields.io/badge/-Linux-orange.svg?style=for-the-badge&logo=linux" alt="Linux">
|
|
78
81
|
</a>
|
|
79
82
|
<a href="https://github.com/Arrowar/StreamingCommunity/releases">
|
|
80
83
|
<img src="https://img.shields.io/badge/-All_Versions-lightgrey.svg?style=for-the-badge" alt="All Versions">
|
|
@@ -189,7 +192,7 @@ For detailed Windows PATH instructions, see the [Windows PATH guide](https://www
|
|
|
189
192
|
```bash
|
|
190
193
|
# For bash (edit ~/.bash_profile)
|
|
191
194
|
export PATH="/your/custom/path:$PATH"
|
|
192
|
-
|
|
195
|
+
|
|
193
196
|
# For zsh (edit ~/.zshrc)
|
|
194
197
|
export PATH="/your/custom/path:$PATH"
|
|
195
198
|
```
|
|
@@ -197,7 +200,7 @@ For detailed Windows PATH instructions, see the [Windows PATH guide](https://www
|
|
|
197
200
|
```bash
|
|
198
201
|
# For bash
|
|
199
202
|
source ~/.bash_profile
|
|
200
|
-
|
|
203
|
+
|
|
201
204
|
# For zsh
|
|
202
205
|
source ~/.zshrc
|
|
203
206
|
```
|
|
@@ -208,7 +211,7 @@ For detailed Windows PATH instructions, see the [Windows PATH guide](https://www
|
|
|
208
211
|
```bash
|
|
209
212
|
# For bash (edit ~/.bashrc)
|
|
210
213
|
export PATH="/your/custom/path:$PATH"
|
|
211
|
-
|
|
214
|
+
|
|
212
215
|
# For zsh (edit ~/.zshrc)
|
|
213
216
|
export PATH="/your/custom/path:$PATH"
|
|
214
217
|
```
|
|
@@ -291,7 +294,7 @@ The configuration file is divided into several main sections:
|
|
|
291
294
|
```
|
|
292
295
|
|
|
293
296
|
- `root_path`: Directory where all videos will be saved
|
|
294
|
-
|
|
297
|
+
|
|
295
298
|
### Path examples:
|
|
296
299
|
* Windows: `C:\\MyLibrary\\Folder` or `\\\\MyServer\\MyLibrary` (if you want to use a network folder)
|
|
297
300
|
* Linux/MacOS: `Desktop/MyLibrary/Folder`
|
|
@@ -317,7 +320,7 @@ The configuration file is divided into several main sections:
|
|
|
317
320
|
`<br/><br/>`
|
|
318
321
|
* Can be changed from terminal with `--map_episode_name`
|
|
319
322
|
<br/><br/>
|
|
320
|
-
|
|
323
|
+
|
|
321
324
|
- `add_siteName`: If set to true, appends the site_name to the root path before the movie and serie folders.
|
|
322
325
|
* Can be changed from terminal with `--add_siteName true/false`
|
|
323
326
|
<br/><br/>
|
|
@@ -437,12 +440,25 @@ You can download VLC Media Player from the [official website](https://www.videol
|
|
|
437
440
|
|
|
438
441
|
```json
|
|
439
442
|
{
|
|
440
|
-
"force_resolution":
|
|
443
|
+
"force_resolution": "1080p",
|
|
441
444
|
"get_only_link": false
|
|
442
445
|
}
|
|
443
446
|
```
|
|
444
447
|
|
|
445
|
-
- `force_resolution`:
|
|
448
|
+
- `force_resolution`: Choose the video resolution for downloading:
|
|
449
|
+
* `"Best"`: Highest available resolution
|
|
450
|
+
* `"Worst"`: Lowest available resolution
|
|
451
|
+
* `"720p"`: Force 720p resolution
|
|
452
|
+
* Or specify one of these resolutions:
|
|
453
|
+
- 1080p (1920x1080)
|
|
454
|
+
- 720p (1280x720)
|
|
455
|
+
- 480p (640x480)
|
|
456
|
+
- 360p (640x360)
|
|
457
|
+
- 320p (480x320)
|
|
458
|
+
- 240p (426x240)
|
|
459
|
+
- 240p (320x240)
|
|
460
|
+
- 144p (256x144)
|
|
461
|
+
|
|
446
462
|
- `get_only_link`: Return M3U8 playlist/index URL instead of downloading
|
|
447
463
|
|
|
448
464
|
|
|
@@ -513,15 +529,31 @@ The `run-container` command mounts also the `config.json` file, so any change to
|
|
|
513
529
|
|
|
514
530
|
## Configuration
|
|
515
531
|
|
|
516
|
-
|
|
532
|
+
The bot was created to replace terminal commands and allow interaction via Telegram. Each download runs within a screen session, enabling multiple downloads to run simultaneously.
|
|
533
|
+
|
|
534
|
+
To run the bot in the background, simply start it inside a screen session and then press Ctrl + A, followed by D, to detach from the session without stopping the bot.
|
|
517
535
|
|
|
518
|
-
|
|
536
|
+
Command Functions:
|
|
537
|
+
|
|
538
|
+
🔹 /start – Starts a new search for a download. This command performs the same operations as manually running the script in the terminal with test_run.py.
|
|
539
|
+
|
|
540
|
+
🔹 /list – Displays the status of active downloads, with options to:
|
|
541
|
+
|
|
542
|
+
Stop an incorrect download using /stop <ID>.
|
|
543
|
+
|
|
544
|
+
View the real-time output of a download using /screen <ID>.
|
|
545
|
+
|
|
546
|
+
⚠ Warning: If a download is interrupted, incomplete files may remain in the folder specified in config.json. These files must be deleted manually to avoid storage or management issues.
|
|
547
|
+
|
|
548
|
+
🛠 Configuration: Currently, the bot's settings are stored in the config.json file, which is located in the same directory as the telegram_bot.py script.
|
|
519
549
|
|
|
520
550
|
## .env Example:
|
|
521
551
|
|
|
552
|
+
You need to create an .env file and enter your Telegram token and user ID to authorize only one user to use it
|
|
553
|
+
|
|
522
554
|
```
|
|
523
555
|
TOKEN_TELEGRAM=IlTuo2131TOKEN$12D3Telegram
|
|
524
|
-
AUTHORIZED_USER_ID=12345678
|
|
556
|
+
AUTHORIZED_USER_ID=12345678
|
|
525
557
|
DEBUG=False
|
|
526
558
|
```
|
|
527
559
|
|
|
@@ -533,11 +565,13 @@ pip install -r requirements.txt
|
|
|
533
565
|
|
|
534
566
|
## On Linux/MacOS:
|
|
535
567
|
|
|
568
|
+
Start the bot from the folder /StreamingCommunity/TelegramHelp
|
|
569
|
+
|
|
536
570
|
```bash
|
|
537
571
|
python3 telegram_bot.py
|
|
538
572
|
```
|
|
539
573
|
|
|
540
|
-
# Website Status
|
|
574
|
+
# Website Status
|
|
541
575
|
|
|
542
576
|
| Website | Status | Command |
|
|
543
577
|
|:-------------------|:------:|:--------:|
|
|
@@ -545,21 +579,21 @@ python3 telegram_bot.py
|
|
|
545
579
|
| [AltadefinizioneGratis](https://altadefinizionegratis.pro/) | ✅ | -ALT |
|
|
546
580
|
| [AnimeUnity](https://animeunity.so/) | ✅ | -ANI |
|
|
547
581
|
| [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ | `-ILC` |
|
|
548
|
-
| [CB01New](https://cb01new.
|
|
582
|
+
| [CB01New](https://cb01new.gold/) | ✅ | -CB0 |
|
|
549
583
|
| [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ | -DDL |
|
|
550
|
-
| [GuardaSerie](https://guardaserie.
|
|
584
|
+
| [GuardaSerie](https://guardaserie.now/) | ✅ | -GUA |
|
|
551
585
|
| [MostraGuarda](https://mostraguarda.stream/) | ✅ | -MOS |
|
|
552
586
|
| [StreamingCommunity](https://streamingcommunity.paris/) | ✅ | -STR |
|
|
553
587
|
|
|
554
588
|
|
|
555
|
-
# Tutorials
|
|
589
|
+
# Tutorials
|
|
556
590
|
|
|
557
591
|
- [Windows Tutorial](https://www.youtube.com/watch?v=mZGqK4wdN-k)
|
|
558
592
|
- [Linux Tutorial](https://www.youtube.com/watch?v=0qUNXPE_mTg)
|
|
559
593
|
- [Pypy Tutorial](https://www.youtube.com/watch?v=C6m9ZKOK0p4)
|
|
560
594
|
- [Compiled .exe Tutorial](https://www.youtube.com/watch?v=pm4lqsxkTVo)
|
|
561
595
|
|
|
562
|
-
# To Do
|
|
596
|
+
# To Do
|
|
563
597
|
|
|
564
598
|
- To Finish [website API](https://github.com/Arrowar/StreamingCommunity/tree/test_gui_1)
|
|
565
599
|
- To finish [website API 2](https://github.com/hydrosh/StreamingCommunity/tree/test_gui_1)
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<img src="https://img.shields.io/pypi/dm/streamingcommunity?style=for-the-badge" alt="PyPI Downloads"/>
|
|
26
26
|
</a>
|
|
27
27
|
<a href="https://github.com/Arrowar/StreamingCommunity">
|
|
28
|
-
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Arrowar/StreamingCommunity/main/
|
|
28
|
+
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Arrowar/StreamingCommunity/main/.github/media/loc-badge.json&style=for-the-badge" alt="Lines of Code"/>
|
|
29
29
|
</a>
|
|
30
30
|
</p>
|
|
31
31
|
|
|
@@ -53,16 +53,19 @@
|
|
|
53
53
|
- 💬 [Support](#support)
|
|
54
54
|
- 🤝 [Contribute](#contributing)
|
|
55
55
|
- ⚠️ [Disclaimer](#disclaimer)
|
|
56
|
-
- ⚡ [Contributors](#contributors)
|
|
56
|
+
- ⚡ [Contributors](#contributors)
|
|
57
57
|
|
|
58
58
|
# Installation
|
|
59
59
|
|
|
60
60
|
<p align="center">
|
|
61
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/
|
|
62
|
-
<img src="https://img.shields.io/badge/-
|
|
61
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe">
|
|
62
|
+
<img src="https://img.shields.io/badge/-Windows-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
|
|
63
63
|
</a>
|
|
64
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/
|
|
65
|
-
<img src="https://img.shields.io/badge/-
|
|
64
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac">
|
|
65
|
+
<img src="https://img.shields.io/badge/-macOS-black.svg?style=for-the-badge&logo=apple" alt="macOS">
|
|
66
|
+
</a>
|
|
67
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux">
|
|
68
|
+
<img src="https://img.shields.io/badge/-Linux-orange.svg?style=for-the-badge&logo=linux" alt="Linux">
|
|
66
69
|
</a>
|
|
67
70
|
<a href="https://github.com/Arrowar/StreamingCommunity/releases">
|
|
68
71
|
<img src="https://img.shields.io/badge/-All_Versions-lightgrey.svg?style=for-the-badge" alt="All Versions">
|
|
@@ -177,7 +180,7 @@ For detailed Windows PATH instructions, see the [Windows PATH guide](https://www
|
|
|
177
180
|
```bash
|
|
178
181
|
# For bash (edit ~/.bash_profile)
|
|
179
182
|
export PATH="/your/custom/path:$PATH"
|
|
180
|
-
|
|
183
|
+
|
|
181
184
|
# For zsh (edit ~/.zshrc)
|
|
182
185
|
export PATH="/your/custom/path:$PATH"
|
|
183
186
|
```
|
|
@@ -185,7 +188,7 @@ For detailed Windows PATH instructions, see the [Windows PATH guide](https://www
|
|
|
185
188
|
```bash
|
|
186
189
|
# For bash
|
|
187
190
|
source ~/.bash_profile
|
|
188
|
-
|
|
191
|
+
|
|
189
192
|
# For zsh
|
|
190
193
|
source ~/.zshrc
|
|
191
194
|
```
|
|
@@ -196,7 +199,7 @@ For detailed Windows PATH instructions, see the [Windows PATH guide](https://www
|
|
|
196
199
|
```bash
|
|
197
200
|
# For bash (edit ~/.bashrc)
|
|
198
201
|
export PATH="/your/custom/path:$PATH"
|
|
199
|
-
|
|
202
|
+
|
|
200
203
|
# For zsh (edit ~/.zshrc)
|
|
201
204
|
export PATH="/your/custom/path:$PATH"
|
|
202
205
|
```
|
|
@@ -279,7 +282,7 @@ The configuration file is divided into several main sections:
|
|
|
279
282
|
```
|
|
280
283
|
|
|
281
284
|
- `root_path`: Directory where all videos will be saved
|
|
282
|
-
|
|
285
|
+
|
|
283
286
|
### Path examples:
|
|
284
287
|
* Windows: `C:\\MyLibrary\\Folder` or `\\\\MyServer\\MyLibrary` (if you want to use a network folder)
|
|
285
288
|
* Linux/MacOS: `Desktop/MyLibrary/Folder`
|
|
@@ -305,7 +308,7 @@ The configuration file is divided into several main sections:
|
|
|
305
308
|
`<br/><br/>`
|
|
306
309
|
* Can be changed from terminal with `--map_episode_name`
|
|
307
310
|
<br/><br/>
|
|
308
|
-
|
|
311
|
+
|
|
309
312
|
- `add_siteName`: If set to true, appends the site_name to the root path before the movie and serie folders.
|
|
310
313
|
* Can be changed from terminal with `--add_siteName true/false`
|
|
311
314
|
<br/><br/>
|
|
@@ -425,12 +428,25 @@ You can download VLC Media Player from the [official website](https://www.videol
|
|
|
425
428
|
|
|
426
429
|
```json
|
|
427
430
|
{
|
|
428
|
-
"force_resolution":
|
|
431
|
+
"force_resolution": "1080p",
|
|
429
432
|
"get_only_link": false
|
|
430
433
|
}
|
|
431
434
|
```
|
|
432
435
|
|
|
433
|
-
- `force_resolution`:
|
|
436
|
+
- `force_resolution`: Choose the video resolution for downloading:
|
|
437
|
+
* `"Best"`: Highest available resolution
|
|
438
|
+
* `"Worst"`: Lowest available resolution
|
|
439
|
+
* `"720p"`: Force 720p resolution
|
|
440
|
+
* Or specify one of these resolutions:
|
|
441
|
+
- 1080p (1920x1080)
|
|
442
|
+
- 720p (1280x720)
|
|
443
|
+
- 480p (640x480)
|
|
444
|
+
- 360p (640x360)
|
|
445
|
+
- 320p (480x320)
|
|
446
|
+
- 240p (426x240)
|
|
447
|
+
- 240p (320x240)
|
|
448
|
+
- 144p (256x144)
|
|
449
|
+
|
|
434
450
|
- `get_only_link`: Return M3U8 playlist/index URL instead of downloading
|
|
435
451
|
|
|
436
452
|
|
|
@@ -501,15 +517,31 @@ The `run-container` command mounts also the `config.json` file, so any change to
|
|
|
501
517
|
|
|
502
518
|
## Configuration
|
|
503
519
|
|
|
504
|
-
|
|
520
|
+
The bot was created to replace terminal commands and allow interaction via Telegram. Each download runs within a screen session, enabling multiple downloads to run simultaneously.
|
|
521
|
+
|
|
522
|
+
To run the bot in the background, simply start it inside a screen session and then press Ctrl + A, followed by D, to detach from the session without stopping the bot.
|
|
505
523
|
|
|
506
|
-
|
|
524
|
+
Command Functions:
|
|
525
|
+
|
|
526
|
+
🔹 /start – Starts a new search for a download. This command performs the same operations as manually running the script in the terminal with test_run.py.
|
|
527
|
+
|
|
528
|
+
🔹 /list – Displays the status of active downloads, with options to:
|
|
529
|
+
|
|
530
|
+
Stop an incorrect download using /stop <ID>.
|
|
531
|
+
|
|
532
|
+
View the real-time output of a download using /screen <ID>.
|
|
533
|
+
|
|
534
|
+
⚠ Warning: If a download is interrupted, incomplete files may remain in the folder specified in config.json. These files must be deleted manually to avoid storage or management issues.
|
|
535
|
+
|
|
536
|
+
🛠 Configuration: Currently, the bot's settings are stored in the config.json file, which is located in the same directory as the telegram_bot.py script.
|
|
507
537
|
|
|
508
538
|
## .env Example:
|
|
509
539
|
|
|
540
|
+
You need to create an .env file and enter your Telegram token and user ID to authorize only one user to use it
|
|
541
|
+
|
|
510
542
|
```
|
|
511
543
|
TOKEN_TELEGRAM=IlTuo2131TOKEN$12D3Telegram
|
|
512
|
-
AUTHORIZED_USER_ID=12345678
|
|
544
|
+
AUTHORIZED_USER_ID=12345678
|
|
513
545
|
DEBUG=False
|
|
514
546
|
```
|
|
515
547
|
|
|
@@ -521,11 +553,13 @@ pip install -r requirements.txt
|
|
|
521
553
|
|
|
522
554
|
## On Linux/MacOS:
|
|
523
555
|
|
|
556
|
+
Start the bot from the folder /StreamingCommunity/TelegramHelp
|
|
557
|
+
|
|
524
558
|
```bash
|
|
525
559
|
python3 telegram_bot.py
|
|
526
560
|
```
|
|
527
561
|
|
|
528
|
-
# Website Status
|
|
562
|
+
# Website Status
|
|
529
563
|
|
|
530
564
|
| Website | Status | Command |
|
|
531
565
|
|:-------------------|:------:|:--------:|
|
|
@@ -533,21 +567,21 @@ python3 telegram_bot.py
|
|
|
533
567
|
| [AltadefinizioneGratis](https://altadefinizionegratis.pro/) | ✅ | -ALT |
|
|
534
568
|
| [AnimeUnity](https://animeunity.so/) | ✅ | -ANI |
|
|
535
569
|
| [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ | `-ILC` |
|
|
536
|
-
| [CB01New](https://cb01new.
|
|
570
|
+
| [CB01New](https://cb01new.gold/) | ✅ | -CB0 |
|
|
537
571
|
| [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ | -DDL |
|
|
538
|
-
| [GuardaSerie](https://guardaserie.
|
|
572
|
+
| [GuardaSerie](https://guardaserie.now/) | ✅ | -GUA |
|
|
539
573
|
| [MostraGuarda](https://mostraguarda.stream/) | ✅ | -MOS |
|
|
540
574
|
| [StreamingCommunity](https://streamingcommunity.paris/) | ✅ | -STR |
|
|
541
575
|
|
|
542
576
|
|
|
543
|
-
# Tutorials
|
|
577
|
+
# Tutorials
|
|
544
578
|
|
|
545
579
|
- [Windows Tutorial](https://www.youtube.com/watch?v=mZGqK4wdN-k)
|
|
546
580
|
- [Linux Tutorial](https://www.youtube.com/watch?v=0qUNXPE_mTg)
|
|
547
581
|
- [Pypy Tutorial](https://www.youtube.com/watch?v=C6m9ZKOK0p4)
|
|
548
582
|
- [Compiled .exe Tutorial](https://www.youtube.com/watch?v=pm4lqsxkTVo)
|
|
549
583
|
|
|
550
|
-
# To Do
|
|
584
|
+
# To Do
|
|
551
585
|
|
|
552
586
|
- To Finish [website API](https://github.com/Arrowar/StreamingCommunity/tree/test_gui_1)
|
|
553
587
|
- To finish [website API 2](https://github.com/hydrosh/StreamingCommunity/tree/test_gui_1)
|
|
@@ -14,17 +14,16 @@ from StreamingCommunity.Util.headers import get_headers
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
# Variable
|
|
17
|
-
from StreamingCommunity.Api.Site.ddlstreamitaly.costant import COOKIE
|
|
18
17
|
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
class VideoSource:
|
|
22
|
-
def __init__(self) -> None:
|
|
21
|
+
def __init__(self, cookie) -> None:
|
|
23
22
|
"""
|
|
24
23
|
Initializes the VideoSource object with default values.
|
|
25
24
|
"""
|
|
26
25
|
self.headers = {'user-agent': get_headers()}
|
|
27
|
-
self.cookie =
|
|
26
|
+
self.cookie = cookie
|
|
28
27
|
|
|
29
28
|
def setup(self, url: str) -> None:
|
|
30
29
|
"""
|
{StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/1337xx/__init__.py
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# 02.07.24
|
|
2
2
|
|
|
3
|
-
import sys
|
|
4
|
-
import subprocess
|
|
5
3
|
from urllib.parse import quote_plus
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
# Internal utilities
|
|
9
7
|
from StreamingCommunity.Util.console import console, msg
|
|
8
|
+
from StreamingCommunity.Api.Template import get_select_title
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
# Logic class
|
|
13
|
-
from .
|
|
12
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
13
|
+
from .site import title_search, media_search_manager, table_show_manager
|
|
14
14
|
from .title import download_title
|
|
15
15
|
|
|
16
16
|
|
|
@@ -20,7 +20,6 @@ _useFor = "film_serie"
|
|
|
20
20
|
_deprecate = False
|
|
21
21
|
_priority = 2
|
|
22
22
|
_engineDownload = "tor"
|
|
23
|
-
from .costant import SITE_NAME
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|
@@ -28,7 +27,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|
|
28
27
|
Main function of the application for film and series.
|
|
29
28
|
"""
|
|
30
29
|
if string_to_search is None:
|
|
31
|
-
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
|
30
|
+
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{site_constant.SITE_NAME}").strip()
|
|
32
31
|
|
|
33
32
|
# Search on database
|
|
34
33
|
len_database = title_search(quote_plus(string_to_search))
|
|
@@ -40,7 +39,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|
|
40
39
|
if len_database > 0:
|
|
41
40
|
|
|
42
41
|
# Select title from list
|
|
43
|
-
select_title =
|
|
42
|
+
select_title = get_select_title(table_show_manager, media_search_manager)
|
|
44
43
|
|
|
45
44
|
# Download title
|
|
46
45
|
download_title(select_title)
|
{StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/1337xx/site.py
RENAMED
|
@@ -13,13 +13,12 @@ from StreamingCommunity.Util.table import TVShowManager
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
# Logic class
|
|
16
|
-
from StreamingCommunity.Api.Template import
|
|
16
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
17
17
|
from StreamingCommunity.Api.Template.Util import search_domain
|
|
18
18
|
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
# Variable
|
|
22
|
-
from .costant import SITE_NAME, DOMAIN_NOW
|
|
23
22
|
media_search_manager = MediaManager()
|
|
24
23
|
table_show_manager = TVShowManager()
|
|
25
24
|
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
@@ -40,15 +39,15 @@ def title_search(word_to_search: str) -> int:
|
|
|
40
39
|
table_show_manager.clear()
|
|
41
40
|
|
|
42
41
|
# Find new domain if prev dont work
|
|
43
|
-
domain_to_use = DOMAIN_NOW
|
|
42
|
+
domain_to_use = site_constant.DOMAIN_NOW
|
|
44
43
|
|
|
45
44
|
if not disable_searchDomain:
|
|
46
|
-
domain_to_use, base_url = search_domain(SITE_NAME, f"https://{SITE_NAME}.{DOMAIN_NOW}")
|
|
45
|
+
domain_to_use, base_url = search_domain(site_constant.SITE_NAME, f"https://{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}")
|
|
47
46
|
|
|
48
47
|
# Construct the full site URL and load the search page
|
|
49
48
|
try:
|
|
50
49
|
response = httpx.get(
|
|
51
|
-
url=f"https://{SITE_NAME}.{domain_to_use}/search/{word_to_search}/1/",
|
|
50
|
+
url=f"https://{site_constant.SITE_NAME}.{domain_to_use}/search/{word_to_search}/1/",
|
|
52
51
|
headers={'user-agent': get_headers()},
|
|
53
52
|
follow_redirects=True,
|
|
54
53
|
timeout=max_timeout
|
|
@@ -56,7 +55,7 @@ def title_search(word_to_search: str) -> int:
|
|
|
56
55
|
response.raise_for_status()
|
|
57
56
|
|
|
58
57
|
except Exception as e:
|
|
59
|
-
console.print(f"Site: {SITE_NAME}, request search error: {e}")
|
|
58
|
+
console.print(f"Site: {site_constant.SITE_NAME}, request search error: {e}")
|
|
60
59
|
|
|
61
60
|
# Create soup and find table
|
|
62
61
|
soup = BeautifulSoup(response.text, "html.parser")
|
|
@@ -72,16 +71,10 @@ def title_search(word_to_search: str) -> int:
|
|
|
72
71
|
'date': tr.find_all("td")[-3].get_text(strip=True).replace("'", ""),
|
|
73
72
|
'size': tr.find_all("td")[-2].get_text(strip=True)
|
|
74
73
|
}
|
|
74
|
+
media_search_manager.add_media(title_info)
|
|
75
75
|
|
|
76
76
|
except Exception as e:
|
|
77
77
|
print(f"Error parsing a film entry: {e}")
|
|
78
78
|
|
|
79
79
|
# Return the number of titles found
|
|
80
|
-
return media_search_manager.get_length()
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
def run_get_select_title():
|
|
84
|
-
"""
|
|
85
|
-
Display a selection of titles and prompt the user to choose one.
|
|
86
|
-
"""
|
|
87
|
-
return get_select_title(table_show_manager, media_search_manager)
|
|
80
|
+
return media_search_manager.get_length()
|
{StreamingCommunity-2.5.6 → StreamingCommunity-2.5.8}/StreamingCommunity/Api/Site/1337xx/title.py
RENAMED
|
@@ -17,12 +17,10 @@ from StreamingCommunity.Lib.Downloader import TOR_downloader
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
# Logic class
|
|
20
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
20
21
|
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
# Config
|
|
24
|
-
from .costant import DOMAIN_NOW, SITE_NAME, MOVIE_FOLDER
|
|
25
|
-
|
|
26
24
|
|
|
27
25
|
def download_title(select_title: MediaItem):
|
|
28
26
|
"""
|
|
@@ -37,13 +35,13 @@ def download_title(select_title: MediaItem):
|
|
|
37
35
|
|
|
38
36
|
# Define output path
|
|
39
37
|
title_name = os_manager.get_sanitize_file(select_title.name)
|
|
40
|
-
mp4_path = os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
|
38
|
+
mp4_path = os.path.join(site_constant.MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
|
41
39
|
|
|
42
40
|
# Create output folder
|
|
43
41
|
os_manager.create_path(mp4_path)
|
|
44
42
|
|
|
45
43
|
# Make request to page with magnet
|
|
46
|
-
full_site_name = f"{SITE_NAME}.{DOMAIN_NOW}"
|
|
44
|
+
full_site_name = f"{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}"
|
|
47
45
|
response = httpx.get(
|
|
48
46
|
url="https://" + full_site_name + select_title.url,
|
|
49
47
|
headers={
|
|
@@ -7,11 +7,13 @@ from urllib.parse import quote_plus
|
|
|
7
7
|
|
|
8
8
|
# Internal utilities
|
|
9
9
|
from StreamingCommunity.Util.console import console, msg
|
|
10
|
+
from StreamingCommunity.Api.Template import get_select_title
|
|
10
11
|
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
# Logic class
|
|
14
|
-
from .
|
|
15
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
16
|
+
from .site import title_search, media_search_manager, table_show_manager
|
|
15
17
|
from .film import download_film
|
|
16
18
|
|
|
17
19
|
|
|
@@ -21,14 +23,13 @@ _useFor = "film"
|
|
|
21
23
|
_deprecate = False
|
|
22
24
|
_priority = 2
|
|
23
25
|
_engineDownload = "hls"
|
|
24
|
-
from .costant import SITE_NAME, TELEGRAM_BOT
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|
28
29
|
"""
|
|
29
30
|
Main function of the application for film and series.
|
|
30
31
|
"""
|
|
31
|
-
if TELEGRAM_BOT:
|
|
32
|
+
if site_constant.TELEGRAM_BOT:
|
|
32
33
|
bot = get_bot_instance()
|
|
33
34
|
|
|
34
35
|
if string_to_search is None:
|
|
@@ -48,7 +49,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|
|
48
49
|
|
|
49
50
|
else:
|
|
50
51
|
if string_to_search is None:
|
|
51
|
-
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
|
52
|
+
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{site_constant.SITE_NAME}").strip()
|
|
52
53
|
|
|
53
54
|
# Search on database
|
|
54
55
|
len_database = title_search(quote_plus(string_to_search))
|
|
@@ -60,13 +61,13 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|
|
60
61
|
if len_database > 0:
|
|
61
62
|
|
|
62
63
|
# Select title from list
|
|
63
|
-
select_title =
|
|
64
|
+
select_title = get_select_title(table_show_manager, media_search_manager)
|
|
64
65
|
|
|
65
66
|
# Download only film
|
|
66
67
|
download_film(select_title)
|
|
67
68
|
|
|
68
69
|
else:
|
|
69
|
-
if TELEGRAM_BOT:
|
|
70
|
+
if site_constant.TELEGRAM_BOT:
|
|
70
71
|
bot.send_message(f"Nessun risultato trovato riprova", None)
|
|
71
72
|
|
|
72
73
|
console.print(f"\n[red]Nothing matching was found for[white]: [purple]{string_to_search}")
|
|
@@ -8,11 +8,11 @@ from StreamingCommunity.Util.console import console
|
|
|
8
8
|
from StreamingCommunity.Util.os import os_manager
|
|
9
9
|
from StreamingCommunity.Util.message import start_message
|
|
10
10
|
from StreamingCommunity.Lib.Downloader import HLS_Downloader
|
|
11
|
-
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
|
12
|
-
from StreamingCommunity.TelegramHelp.session import get_session, updateScriptId, deleteScriptId
|
|
11
|
+
from StreamingCommunity.TelegramHelp.telegram_bot import TelegramSession, get_bot_instance
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
# Logic class
|
|
15
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
16
16
|
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
17
17
|
|
|
18
18
|
|
|
@@ -20,10 +20,6 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
|
20
20
|
from StreamingCommunity.Api.Player.supervideo import VideoSource
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
# Config
|
|
24
|
-
from .costant import MOVIE_FOLDER, TELEGRAM_BOT
|
|
25
|
-
|
|
26
|
-
|
|
27
23
|
def download_film(select_title: MediaItem) -> str:
|
|
28
24
|
"""
|
|
29
25
|
Downloads a film using the provided film ID, title name, and domain.
|
|
@@ -35,43 +31,42 @@ def download_film(select_title: MediaItem) -> str:
|
|
|
35
31
|
Return:
|
|
36
32
|
- str: output path
|
|
37
33
|
"""
|
|
38
|
-
if TELEGRAM_BOT:
|
|
34
|
+
if site_constant.TELEGRAM_BOT:
|
|
39
35
|
bot = get_bot_instance()
|
|
40
36
|
bot.send_message(f"Download in corso:\n{select_title.name}", None)
|
|
41
|
-
|
|
37
|
+
|
|
42
38
|
# Get script_id
|
|
43
|
-
script_id = get_session()
|
|
39
|
+
script_id = TelegramSession.get_session()
|
|
44
40
|
if script_id != "unknown":
|
|
45
|
-
updateScriptId(script_id, select_title.name)
|
|
41
|
+
TelegramSession.updateScriptId(script_id, select_title.name)
|
|
46
42
|
|
|
47
43
|
# Start message and display film information
|
|
48
44
|
start_message()
|
|
49
45
|
console.print(f"[yellow]Download: [red]{select_title.name} \n")
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
|
|
52
47
|
# Set domain and media ID for the video source
|
|
53
48
|
video_source = VideoSource(select_title.url)
|
|
54
49
|
|
|
55
50
|
# Define output path
|
|
56
51
|
title_name = os_manager.get_sanitize_file(select_title.name) + ".mp4"
|
|
57
|
-
mp4_path = os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
|
52
|
+
mp4_path = os.path.join(site_constant.MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
|
58
53
|
|
|
59
54
|
# Get m3u8 master playlist
|
|
60
55
|
master_playlist = video_source.get_playlist()
|
|
61
56
|
|
|
62
57
|
# Download the film using the m3u8 playlist, and output filename
|
|
63
58
|
r_proc = HLS_Downloader(
|
|
64
|
-
m3u8_url=master_playlist,
|
|
59
|
+
m3u8_url=master_playlist,
|
|
65
60
|
output_path=os.path.join(mp4_path, title_name)
|
|
66
61
|
).start()
|
|
67
62
|
|
|
68
|
-
if TELEGRAM_BOT:
|
|
69
|
-
|
|
63
|
+
if site_constant.TELEGRAM_BOT:
|
|
64
|
+
|
|
70
65
|
# Delete script_id
|
|
71
|
-
script_id = get_session()
|
|
66
|
+
script_id = TelegramSession.get_session()
|
|
72
67
|
if script_id != "unknown":
|
|
73
|
-
deleteScriptId(script_id)
|
|
74
|
-
|
|
68
|
+
TelegramSession.deleteScriptId(script_id)
|
|
69
|
+
|
|
75
70
|
if "error" in r_proc.keys():
|
|
76
71
|
try:
|
|
77
72
|
os.remove(r_proc['path'])
|