StreamingCommunity 2.5.2__py3-none-any.whl → 2.5.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of StreamingCommunity might be problematic. Click here for more details.
- StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +143 -143
- StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +136 -136
- StreamingCommunity/Api/Player/ddl.py +89 -89
- StreamingCommunity/Api/Player/maxstream.py +151 -151
- StreamingCommunity/Api/Player/supervideo.py +193 -193
- StreamingCommunity/Api/Player/vixcloud.py +272 -272
- StreamingCommunity/Api/Site/1337xx/__init__.py +51 -50
- StreamingCommunity/Api/Site/1337xx/costant.py +14 -14
- StreamingCommunity/Api/Site/1337xx/site.py +87 -89
- StreamingCommunity/Api/Site/1337xx/title.py +63 -64
- StreamingCommunity/Api/Site/altadefinizionegratis/__init__.py +74 -50
- StreamingCommunity/Api/Site/altadefinizionegratis/costant.py +21 -19
- StreamingCommunity/Api/Site/altadefinizionegratis/film.py +81 -72
- StreamingCommunity/Api/Site/altadefinizionegratis/site.py +116 -94
- StreamingCommunity/Api/Site/animeunity/__init__.py +75 -50
- StreamingCommunity/Api/Site/animeunity/costant.py +21 -19
- StreamingCommunity/Api/Site/animeunity/film_serie.py +171 -134
- StreamingCommunity/Api/Site/animeunity/site.py +191 -174
- StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +97 -97
- StreamingCommunity/Api/Site/cb01new/__init__.py +51 -51
- StreamingCommunity/Api/Site/cb01new/costant.py +19 -19
- StreamingCommunity/Api/Site/cb01new/film.py +61 -71
- StreamingCommunity/Api/Site/cb01new/site.py +82 -82
- StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +55 -55
- StreamingCommunity/Api/Site/ddlstreamitaly/costant.py +20 -20
- StreamingCommunity/Api/Site/ddlstreamitaly/series.py +149 -145
- StreamingCommunity/Api/Site/ddlstreamitaly/site.py +98 -98
- StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +84 -84
- StreamingCommunity/Api/Site/guardaserie/__init__.py +50 -50
- StreamingCommunity/Api/Site/guardaserie/costant.py +19 -19
- StreamingCommunity/Api/Site/guardaserie/series.py +199 -198
- StreamingCommunity/Api/Site/guardaserie/site.py +89 -89
- StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +110 -110
- StreamingCommunity/Api/Site/ilcorsaronero/__init__.py +51 -51
- StreamingCommunity/Api/Site/ilcorsaronero/costant.py +18 -18
- StreamingCommunity/Api/Site/ilcorsaronero/site.py +71 -71
- StreamingCommunity/Api/Site/ilcorsaronero/title.py +44 -44
- StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +149 -149
- StreamingCommunity/Api/Site/mostraguarda/__init__.py +48 -48
- StreamingCommunity/Api/Site/mostraguarda/costant.py +18 -18
- StreamingCommunity/Api/Site/mostraguarda/film.py +90 -101
- StreamingCommunity/Api/Site/streamingcommunity/__init__.py +79 -55
- StreamingCommunity/Api/Site/streamingcommunity/costant.py +21 -19
- StreamingCommunity/Api/Site/streamingcommunity/film.py +86 -75
- StreamingCommunity/Api/Site/streamingcommunity/series.py +259 -207
- StreamingCommunity/Api/Site/streamingcommunity/site.py +156 -142
- StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +124 -124
- StreamingCommunity/Api/Template/Class/SearchType.py +101 -101
- StreamingCommunity/Api/Template/Util/__init__.py +4 -4
- StreamingCommunity/Api/Template/Util/get_domain.py +201 -201
- StreamingCommunity/Api/Template/Util/manage_ep.py +178 -178
- StreamingCommunity/Api/Template/Util/recall_search.py +37 -37
- StreamingCommunity/Api/Template/__init__.py +2 -2
- StreamingCommunity/Api/Template/site.py +87 -87
- StreamingCommunity/Lib/Downloader/HLS/downloader.py +529 -1008
- StreamingCommunity/Lib/Downloader/HLS/proxyes.py +110 -110
- StreamingCommunity/Lib/Downloader/HLS/segments.py +446 -573
- StreamingCommunity/Lib/Downloader/MP4/downloader.py +181 -155
- StreamingCommunity/Lib/Downloader/TOR/downloader.py +297 -295
- StreamingCommunity/Lib/Downloader/__init__.py +4 -4
- StreamingCommunity/Lib/FFmpeg/__init__.py +4 -4
- StreamingCommunity/Lib/FFmpeg/capture.py +170 -170
- StreamingCommunity/Lib/FFmpeg/command.py +264 -296
- StreamingCommunity/Lib/FFmpeg/util.py +248 -248
- StreamingCommunity/Lib/M3U8/__init__.py +5 -5
- StreamingCommunity/Lib/M3U8/decryptor.py +164 -164
- StreamingCommunity/Lib/M3U8/estimator.py +146 -228
- StreamingCommunity/Lib/M3U8/parser.py +666 -666
- StreamingCommunity/Lib/M3U8/url_fixer.py +57 -57
- StreamingCommunity/Lib/TMBD/__init__.py +1 -1
- StreamingCommunity/Lib/TMBD/obj_tmbd.py +39 -39
- StreamingCommunity/Lib/TMBD/tmdb.py +345 -345
- StreamingCommunity/TelegramHelp/__init__.py +0 -0
- StreamingCommunity/TelegramHelp/request_manager.py +82 -0
- StreamingCommunity/TelegramHelp/session.py +56 -0
- StreamingCommunity/TelegramHelp/telegram_bot.py +561 -0
- StreamingCommunity/Upload/update.py +75 -67
- StreamingCommunity/Upload/version.py +5 -5
- StreamingCommunity/Util/_jsonConfig.py +227 -228
- StreamingCommunity/Util/call_stack.py +42 -42
- StreamingCommunity/Util/color.py +20 -20
- StreamingCommunity/Util/console.py +12 -12
- StreamingCommunity/Util/ffmpeg_installer.py +342 -370
- StreamingCommunity/Util/headers.py +159 -159
- StreamingCommunity/Util/logger.py +61 -61
- StreamingCommunity/Util/message.py +36 -64
- StreamingCommunity/Util/os.py +500 -507
- StreamingCommunity/Util/table.py +271 -228
- StreamingCommunity/run.py +352 -245
- {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.5.dist-info}/LICENSE +674 -674
- {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.5.dist-info}/METADATA +601 -543
- StreamingCommunity-2.5.5.dist-info/RECORD +96 -0
- {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.5.dist-info}/entry_points.txt +0 -1
- StreamingCommunity/Api/Player/Helper/Vixcloud/__pycache__/js_parser.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Player/Helper/Vixcloud/__pycache__/js_parser.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Player/Helper/Vixcloud/__pycache__/util.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Player/Helper/Vixcloud/__pycache__/util.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Player/__pycache__/ddl.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Player/__pycache__/ddl.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Player/__pycache__/maxstream.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Player/__pycache__/maxstream.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Player/__pycache__/supervideo.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Player/__pycache__/supervideo.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Player/__pycache__/vixcloud.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Player/__pycache__/vixcloud.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/1337xx/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/1337xx/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/1337xx/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/1337xx/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/1337xx/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/1337xx/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/1337xx/__pycache__/title.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/1337xx/__pycache__/title.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/film.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/film.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/__pycache__/film_serie.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/__pycache__/film_serie.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/util/__pycache__/ScrapeSerie.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/animeunity/util/__pycache__/ScrapeSerie.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/cb01new/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/cb01new/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/cb01new/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/cb01new/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/cb01new/__pycache__/film.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/cb01new/__pycache__/film.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/cb01new/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/cb01new/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/series.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/series.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/util/__pycache__/ScrapeSerie.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ddlstreamitaly/util/__pycache__/ScrapeSerie.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/__pycache__/series.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/__pycache__/series.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/util/__pycache__/ScrapeSerie.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/guardaserie/util/__pycache__/ScrapeSerie.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/title.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/title.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/util/__pycache__/ilCorsarScraper.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/ilcorsaronero/util/__pycache__/ilCorsarScraper.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/mostraguarda/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/mostraguarda/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/mostraguarda/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/mostraguarda/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/mostraguarda/__pycache__/film.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/mostraguarda/__pycache__/film.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/costant.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/costant.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/film.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/film.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/series.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/series.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/util/__pycache__/ScrapeSerie.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Site/streamingcommunity/util/__pycache__/ScrapeSerie.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Template/Class/__pycache__/SearchType.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Template/Class/__pycache__/SearchType.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Template/Util/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Template/Util/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Template/Util/__pycache__/get_domain.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Template/Util/__pycache__/get_domain.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Template/Util/__pycache__/manage_ep.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Template/Util/__pycache__/manage_ep.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Template/Util/__pycache__/recall_search.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Template/Util/__pycache__/recall_search.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Template/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Template/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Api/Template/__pycache__/site.cpython-313.pyc +0 -0
- StreamingCommunity/Api/Template/__pycache__/site.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/Downloader/HLS/__pycache__/downloader.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/Downloader/HLS/__pycache__/downloader.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/Downloader/HLS/__pycache__/proxyes.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/Downloader/HLS/__pycache__/proxyes.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/Downloader/HLS/__pycache__/segments.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/Downloader/HLS/__pycache__/segments.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/Downloader/MP4/__pycache__/downloader.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/Downloader/MP4/__pycache__/downloader.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/Downloader/TOR/__pycache__/downloader.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/Downloader/TOR/__pycache__/downloader.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/Downloader/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/Downloader/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/FFmpeg/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/FFmpeg/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/FFmpeg/__pycache__/capture.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/FFmpeg/__pycache__/capture.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/FFmpeg/__pycache__/command.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/FFmpeg/__pycache__/command.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/FFmpeg/__pycache__/util.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/FFmpeg/__pycache__/util.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/decryptor.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/decryptor.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/estimator.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/estimator.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/parser.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/parser.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/url_fixer.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/M3U8/__pycache__/url_fixer.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/TMBD/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/TMBD/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/TMBD/__pycache__/obj_tmbd.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/TMBD/__pycache__/obj_tmbd.cpython-39.pyc +0 -0
- StreamingCommunity/Lib/TMBD/__pycache__/tmdb.cpython-313.pyc +0 -0
- StreamingCommunity/Lib/TMBD/__pycache__/tmdb.cpython-39.pyc +0 -0
- StreamingCommunity/Upload/__pycache__/update.cpython-313.pyc +0 -0
- StreamingCommunity/Upload/__pycache__/update.cpython-39.pyc +0 -0
- StreamingCommunity/Upload/__pycache__/version.cpython-313.pyc +0 -0
- StreamingCommunity/Upload/__pycache__/version.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/_jsonConfig.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/_jsonConfig.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/call_stack.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/call_stack.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/color.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/color.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/console.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/console.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/ffmpeg_installer.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/ffmpeg_installer.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/headers.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/headers.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/logger.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/logger.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/message.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/message.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/os.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/os.cpython-39.pyc +0 -0
- StreamingCommunity/Util/__pycache__/table.cpython-313.pyc +0 -0
- StreamingCommunity/Util/__pycache__/table.cpython-39.pyc +0 -0
- StreamingCommunity/__pycache__/__init__.cpython-313.pyc +0 -0
- StreamingCommunity/__pycache__/__init__.cpython-39.pyc +0 -0
- StreamingCommunity/__pycache__/run.cpython-313.pyc +0 -0
- StreamingCommunity/__pycache__/run.cpython-39.pyc +0 -0
- StreamingCommunity-2.5.2.dist-info/RECORD +0 -264
- {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.5.dist-info}/WHEEL +0 -0
- {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.5.dist-info}/top_level.txt +0 -0
StreamingCommunity/run.py
CHANGED
|
@@ -1,245 +1,352 @@
|
|
|
1
|
-
# 10.12.23
|
|
2
|
-
|
|
3
|
-
import os
|
|
4
|
-
import sys
|
|
5
|
-
import time
|
|
6
|
-
import glob
|
|
7
|
-
import logging
|
|
8
|
-
import platform
|
|
9
|
-
import argparse
|
|
10
|
-
import importlib
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from StreamingCommunity.Util.
|
|
17
|
-
from StreamingCommunity.Util.
|
|
18
|
-
from StreamingCommunity.
|
|
19
|
-
from StreamingCommunity.
|
|
20
|
-
from StreamingCommunity.Util.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
#
|
|
171
|
-
|
|
172
|
-
"
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
#
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
1
|
+
# 10.12.23
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import time
|
|
6
|
+
import glob
|
|
7
|
+
import logging
|
|
8
|
+
import platform
|
|
9
|
+
import argparse
|
|
10
|
+
import importlib
|
|
11
|
+
import threading, asyncio
|
|
12
|
+
from typing import Callable
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Internal utilities
|
|
16
|
+
from StreamingCommunity.Util.message import start_message
|
|
17
|
+
from StreamingCommunity.Util.console import console, msg
|
|
18
|
+
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
19
|
+
from StreamingCommunity.Upload.update import update as git_update
|
|
20
|
+
from StreamingCommunity.Util.os import os_summary
|
|
21
|
+
from StreamingCommunity.Util.logger import Logger
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# Telegram util
|
|
25
|
+
from StreamingCommunity.TelegramHelp.session import get_session, deleteScriptId
|
|
26
|
+
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Config
|
|
30
|
+
CLOSE_CONSOLE = config_manager.get_bool('DEFAULT', 'not_close')
|
|
31
|
+
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def run_function(func: Callable[..., None], close_console: bool = False) -> None:
|
|
36
|
+
"""
|
|
37
|
+
Run a given function indefinitely or once, depending on the value of close_console.
|
|
38
|
+
|
|
39
|
+
Parameters:
|
|
40
|
+
func (Callable[..., None]): The function to run.
|
|
41
|
+
close_console (bool, optional): Whether to close the console after running the function once. Defaults to False.
|
|
42
|
+
"""
|
|
43
|
+
if close_console:
|
|
44
|
+
while 1:
|
|
45
|
+
func()
|
|
46
|
+
else:
|
|
47
|
+
func()
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def load_search_functions():
|
|
51
|
+
modules = []
|
|
52
|
+
loaded_functions = {}
|
|
53
|
+
|
|
54
|
+
# Lista dei siti da escludere se TELEGRAM_BOT è attivo
|
|
55
|
+
excluded_sites = {"cb01new", "ddlstreamitaly", "guardaserie", "ilcorsaronero", "mostraguarda"} if TELEGRAM_BOT else set()
|
|
56
|
+
|
|
57
|
+
# Find api home directory
|
|
58
|
+
if getattr(sys, 'frozen', False): # Modalità PyInstaller
|
|
59
|
+
base_path = os.path.join(sys._MEIPASS, "StreamingCommunity")
|
|
60
|
+
else:
|
|
61
|
+
base_path = os.path.dirname(__file__)
|
|
62
|
+
|
|
63
|
+
api_dir = os.path.join(base_path, 'Api', 'Site')
|
|
64
|
+
init_files = glob.glob(os.path.join(api_dir, '*', '__init__.py'))
|
|
65
|
+
|
|
66
|
+
# Retrieve modules and their indices
|
|
67
|
+
for init_file in init_files:
|
|
68
|
+
|
|
69
|
+
# Get folder name as module name
|
|
70
|
+
module_name = os.path.basename(os.path.dirname(init_file))
|
|
71
|
+
|
|
72
|
+
# Se il modulo è nella lista da escludere, saltalo
|
|
73
|
+
if module_name in excluded_sites:
|
|
74
|
+
continue
|
|
75
|
+
|
|
76
|
+
logging.info(f"Load module name: {module_name}")
|
|
77
|
+
|
|
78
|
+
try:
|
|
79
|
+
# Dynamically import the module
|
|
80
|
+
mod = importlib.import_module(f'StreamingCommunity.Api.Site.{module_name}')
|
|
81
|
+
|
|
82
|
+
# Get 'indice' from the module
|
|
83
|
+
indice = getattr(mod, 'indice', 0)
|
|
84
|
+
is_deprecate = bool(getattr(mod, '_deprecate', True))
|
|
85
|
+
use_for = getattr(mod, '_useFor', 'other')
|
|
86
|
+
|
|
87
|
+
if not is_deprecate:
|
|
88
|
+
modules.append((module_name, indice, use_for))
|
|
89
|
+
|
|
90
|
+
except Exception as e:
|
|
91
|
+
console.print(f"[red]Failed to import module {module_name}: {str(e)}")
|
|
92
|
+
|
|
93
|
+
# Sort modules by 'indice'
|
|
94
|
+
modules.sort(key=lambda x: x[1])
|
|
95
|
+
|
|
96
|
+
# Load search functions in the sorted order
|
|
97
|
+
for module_name, _, use_for in modules:
|
|
98
|
+
|
|
99
|
+
# Construct a unique alias for the module
|
|
100
|
+
module_alias = f'{module_name}_search'
|
|
101
|
+
|
|
102
|
+
try:
|
|
103
|
+
|
|
104
|
+
# Dynamically import the module
|
|
105
|
+
mod = importlib.import_module(f'StreamingCommunity.Api.Site.{module_name}')
|
|
106
|
+
|
|
107
|
+
# Get the search function from the module (assuming the function is named 'search' and defined in __init__.py)
|
|
108
|
+
search_function = getattr(mod, 'search')
|
|
109
|
+
|
|
110
|
+
# Add the function to the loaded functions dictionary
|
|
111
|
+
loaded_functions[module_alias] = (search_function, use_for)
|
|
112
|
+
|
|
113
|
+
except Exception as e:
|
|
114
|
+
console.print(f"[red]Failed to load search function from module {module_name}: {str(e)}")
|
|
115
|
+
|
|
116
|
+
return loaded_functions
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def initialize():
|
|
120
|
+
|
|
121
|
+
# Get start message
|
|
122
|
+
start_message()
|
|
123
|
+
|
|
124
|
+
# Get system info
|
|
125
|
+
os_summary.get_system_summary()
|
|
126
|
+
|
|
127
|
+
# Set terminal size for win 7
|
|
128
|
+
if platform.system() == "Windows" and "7" in platform.version():
|
|
129
|
+
os.system('mode 120, 40')
|
|
130
|
+
|
|
131
|
+
# Check python version
|
|
132
|
+
if sys.version_info < (3, 7):
|
|
133
|
+
console.log("[red]Install python version > 3.7.16")
|
|
134
|
+
sys.exit(0)
|
|
135
|
+
|
|
136
|
+
# Attempting GitHub update
|
|
137
|
+
try:
|
|
138
|
+
git_update()
|
|
139
|
+
except:
|
|
140
|
+
console.log("[red]Error with loading github.")
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def restart_script():
|
|
144
|
+
"""Riavvia lo script con gli stessi argomenti della riga di comando."""
|
|
145
|
+
print("\n🔄 Riavvio dello script...\n")
|
|
146
|
+
python = sys.executable
|
|
147
|
+
os.execv(python, [python] + sys.argv)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def force_exit():
|
|
151
|
+
"""Forza la chiusura dello script in qualsiasi contesto."""
|
|
152
|
+
|
|
153
|
+
print("\n🛑 Chiusura dello script in corso...")
|
|
154
|
+
|
|
155
|
+
# 1️⃣ Chiudi tutti i thread tranne il principale
|
|
156
|
+
for t in threading.enumerate():
|
|
157
|
+
if t is not threading.main_thread():
|
|
158
|
+
print(f"🔄 Chiusura thread: {t.name}")
|
|
159
|
+
t.join(timeout=1)
|
|
160
|
+
|
|
161
|
+
# 2️⃣ Ferma asyncio, se attivo
|
|
162
|
+
try:
|
|
163
|
+
loop = asyncio.get_event_loop()
|
|
164
|
+
if loop.is_running():
|
|
165
|
+
print("⚡ Arresto del loop asyncio...")
|
|
166
|
+
loop.stop()
|
|
167
|
+
except RuntimeError:
|
|
168
|
+
pass
|
|
169
|
+
|
|
170
|
+
# 3️⃣ Esce con sys.exit(), se fallisce usa os._exit()
|
|
171
|
+
try:
|
|
172
|
+
print("✅ Uscita con sys.exit(0)")
|
|
173
|
+
sys.exit(0)
|
|
174
|
+
except SystemExit:
|
|
175
|
+
pass
|
|
176
|
+
|
|
177
|
+
print("🚨 Uscita forzata con os._exit(0)")
|
|
178
|
+
os._exit(0)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def main(script_id):
|
|
182
|
+
|
|
183
|
+
if TELEGRAM_BOT:
|
|
184
|
+
bot = get_bot_instance()
|
|
185
|
+
bot.send_message(f"🏁 Avviato script {script_id}", None)
|
|
186
|
+
|
|
187
|
+
start = time.time()
|
|
188
|
+
|
|
189
|
+
# Create logger
|
|
190
|
+
log_not = Logger()
|
|
191
|
+
initialize()
|
|
192
|
+
|
|
193
|
+
# Load search functions
|
|
194
|
+
search_functions = load_search_functions()
|
|
195
|
+
logging.info(f"Load module in: {time.time() - start} s")
|
|
196
|
+
|
|
197
|
+
# Create argument parser
|
|
198
|
+
parser = argparse.ArgumentParser(
|
|
199
|
+
description='Script to download movies and series from the internet. Use these commands to configure the script and control its behavior.'
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
parser.add_argument("script_id", nargs="?", default="unknown", help="ID dello script")
|
|
203
|
+
|
|
204
|
+
# Add arguments for the main configuration parameters
|
|
205
|
+
parser.add_argument(
|
|
206
|
+
'--add_siteName', type=bool, help='Enable or disable adding the site name to the file name (e.g., true/false).'
|
|
207
|
+
)
|
|
208
|
+
parser.add_argument(
|
|
209
|
+
'--disable_searchDomain', type=bool, help='Enable or disable searching in configured domains (e.g., true/false).'
|
|
210
|
+
)
|
|
211
|
+
parser.add_argument(
|
|
212
|
+
'--not_close', type=bool, help='If set to true, the script will not close the console after execution (e.g., true/false).'
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
# Add arguments for M3U8 configuration
|
|
216
|
+
parser.add_argument(
|
|
217
|
+
'--default_video_worker', type=int, help='Number of workers for video during M3U8 download (default: 12).'
|
|
218
|
+
)
|
|
219
|
+
parser.add_argument(
|
|
220
|
+
'--default_audio_worker', type=int, help='Number of workers for audio during M3U8 download (default: 12).'
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
# Add options for audio and subtitles
|
|
224
|
+
parser.add_argument(
|
|
225
|
+
'--specific_list_audio', type=str, help='Comma-separated list of specific audio languages to download (e.g., ita,eng).'
|
|
226
|
+
)
|
|
227
|
+
parser.add_argument(
|
|
228
|
+
'--specific_list_subtitles', type=str, help='Comma-separated list of specific subtitle languages to download (e.g., eng,spa).'
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
# Add arguments for search functions
|
|
232
|
+
color_map = {
|
|
233
|
+
"anime": "red",
|
|
234
|
+
"film_serie": "yellow",
|
|
235
|
+
"film": "blue",
|
|
236
|
+
"serie": "green",
|
|
237
|
+
"other": "white"
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
# Add dynamic arguments based on loaded search modules
|
|
241
|
+
for alias, (_, use_for) in search_functions.items():
|
|
242
|
+
short_option = alias[:3].upper()
|
|
243
|
+
long_option = alias
|
|
244
|
+
parser.add_argument(f'-{short_option}', f'--{long_option}', action='store_true', help=f'Search for {alias.split("_")[0]} on streaming platforms.')
|
|
245
|
+
|
|
246
|
+
# Parse command-line arguments
|
|
247
|
+
args = parser.parse_args()
|
|
248
|
+
|
|
249
|
+
# Map command-line arguments to the config values
|
|
250
|
+
config_updates = {}
|
|
251
|
+
|
|
252
|
+
if args.add_siteName is not None:
|
|
253
|
+
config_updates['DEFAULT.add_siteName'] = args.add_siteName
|
|
254
|
+
if args.disable_searchDomain is not None:
|
|
255
|
+
config_updates['DEFAULT.disable_searchDomain'] = args.disable_searchDomain
|
|
256
|
+
if args.not_close is not None:
|
|
257
|
+
config_updates['DEFAULT.not_close'] = args.not_close
|
|
258
|
+
if args.default_video_worker is not None:
|
|
259
|
+
config_updates['M3U8_DOWNLOAD.default_video_worker'] = args.default_video_worker
|
|
260
|
+
if args.default_audio_worker is not None:
|
|
261
|
+
config_updates['M3U8_DOWNLOAD.default_audio_worker'] = args.default_audio_worker
|
|
262
|
+
if args.specific_list_audio is not None:
|
|
263
|
+
config_updates['M3U8_DOWNLOAD.specific_list_audio'] = args.specific_list_audio.split(',')
|
|
264
|
+
if args.specific_list_subtitles is not None:
|
|
265
|
+
config_updates['M3U8_DOWNLOAD.specific_list_subtitles'] = args.specific_list_subtitles.split(',')
|
|
266
|
+
|
|
267
|
+
# Apply the updates to the config file
|
|
268
|
+
for key, value in config_updates.items():
|
|
269
|
+
section, option = key.split('.')
|
|
270
|
+
config_manager.set_key(section, option, value)
|
|
271
|
+
|
|
272
|
+
config_manager.write_config()
|
|
273
|
+
|
|
274
|
+
# Map command-line arguments to functions
|
|
275
|
+
arg_to_function = {alias: func for alias, (func, _) in search_functions.items()}
|
|
276
|
+
|
|
277
|
+
# Check which argument is provided and run the corresponding function
|
|
278
|
+
for arg, func in arg_to_function.items():
|
|
279
|
+
if getattr(args, arg):
|
|
280
|
+
run_function(func)
|
|
281
|
+
return
|
|
282
|
+
|
|
283
|
+
# Mapping user input to functions
|
|
284
|
+
input_to_function = {str(i): func for i, (alias, (func, _)) in enumerate(search_functions.items())}
|
|
285
|
+
|
|
286
|
+
# Create dynamic prompt message and choices
|
|
287
|
+
choice_labels = {str(i): (alias.split("_")[0].capitalize(), use_for) for i, (alias, (_, use_for)) in enumerate(search_functions.items())}
|
|
288
|
+
|
|
289
|
+
# Display the category legend in a single line
|
|
290
|
+
legend_text = " | ".join([f"[{color}]{category.capitalize()}[/{color}]" for category, color in color_map.items()])
|
|
291
|
+
console.print(f"\n[bold green]Category Legend:[/bold green] {legend_text}")
|
|
292
|
+
|
|
293
|
+
# Construct the prompt message with color-coded site names
|
|
294
|
+
prompt_message = "[green]Insert category [white](" + ", ".join(
|
|
295
|
+
[f"{key}: [{color_map[label[1]]}]{label[0]}[/{color_map[label[1]]}]" for key, label in choice_labels.items()]
|
|
296
|
+
) + "[white])"
|
|
297
|
+
|
|
298
|
+
if TELEGRAM_BOT:
|
|
299
|
+
|
|
300
|
+
# Mappa delle emoji per i colori
|
|
301
|
+
emoji_map = {
|
|
302
|
+
"yellow": "🟡", # Giallo
|
|
303
|
+
"red": "🔴", # Rosso
|
|
304
|
+
"blue": "🔵", # Blu
|
|
305
|
+
"green": "🟢" # Verde
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
# Display the category legend in a single line
|
|
309
|
+
category_legend_str = "Categorie: \n" + " | ".join([
|
|
310
|
+
f"{emoji_map.get(color, '⚪')} {category.capitalize()}"
|
|
311
|
+
for category, color in color_map.items()
|
|
312
|
+
])
|
|
313
|
+
|
|
314
|
+
# Costruisci il messaggio con le emoji al posto dei colori
|
|
315
|
+
prompt_message = "Inserisci il sito:\n" + "\n".join(
|
|
316
|
+
[f"{key}: {emoji_map[color_map[label[1]]]} {label[0]}" for key, label in choice_labels.items()]
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
console.print(f"\n{prompt_message}")
|
|
320
|
+
|
|
321
|
+
# Chiedi la scelta all'utente con il bot Telegram
|
|
322
|
+
category = bot.ask(
|
|
323
|
+
"select_provider",
|
|
324
|
+
f"{category_legend_str}\n\n{prompt_message}",
|
|
325
|
+
None # Passiamo la lista delle chiavi come scelte
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
else:
|
|
329
|
+
category = msg.ask(prompt_message, choices=list(choice_labels.keys()), default="0", show_choices=False, show_default=False)
|
|
330
|
+
|
|
331
|
+
# Run the corresponding function based on user input
|
|
332
|
+
if category in input_to_function:
|
|
333
|
+
run_function(input_to_function[category])
|
|
334
|
+
else:
|
|
335
|
+
|
|
336
|
+
if TELEGRAM_BOT:
|
|
337
|
+
bot.send_message(f"Categoria non valida", None)
|
|
338
|
+
|
|
339
|
+
console.print("[red]Invalid category.")
|
|
340
|
+
|
|
341
|
+
if CLOSE_CONSOLE:
|
|
342
|
+
restart_script() # Riavvia lo script invece di uscire
|
|
343
|
+
else:
|
|
344
|
+
force_exit() # Usa la funzione per chiudere sempre
|
|
345
|
+
|
|
346
|
+
if TELEGRAM_BOT:
|
|
347
|
+
bot.send_message(f"Chiusura in corso", None)
|
|
348
|
+
|
|
349
|
+
# Delete script_id
|
|
350
|
+
script_id = get_session()
|
|
351
|
+
if script_id != "unknown":
|
|
352
|
+
deleteScriptId(script_id)
|