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
|
@@ -1,160 +1,160 @@
|
|
|
1
|
-
# 4.04.24
|
|
2
|
-
|
|
3
|
-
import re
|
|
4
|
-
import sys
|
|
5
|
-
import random
|
|
6
|
-
from importlib.metadata import version, PackageNotFoundError
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# External library
|
|
10
|
-
from fake_useragent import UserAgent
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# Variable
|
|
14
|
-
try:
|
|
15
|
-
ua_version = version('fake-useragent')
|
|
16
|
-
except PackageNotFoundError:
|
|
17
|
-
ua_version = None
|
|
18
|
-
|
|
19
|
-
if not getattr(sys, 'frozen', False):
|
|
20
|
-
if ua_version == '1.1.3':
|
|
21
|
-
ua = UserAgent(use_external_data=True)
|
|
22
|
-
else:
|
|
23
|
-
ua = UserAgent()
|
|
24
|
-
else:
|
|
25
|
-
ua = UserAgent()
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def extract_versions(user_agent):
|
|
29
|
-
"""
|
|
30
|
-
Extract browser versions from the user agent.
|
|
31
|
-
|
|
32
|
-
Parameters:
|
|
33
|
-
user_agent (str): User agent of the browser.
|
|
34
|
-
|
|
35
|
-
Returns:
|
|
36
|
-
list: List of browser versions.
|
|
37
|
-
"""
|
|
38
|
-
|
|
39
|
-
# Patterns to extract versions from various user agents
|
|
40
|
-
patterns = {
|
|
41
|
-
'chrome': re.compile(r'Chrome/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
|
|
42
|
-
'firefox': re.compile(r'Firefox/(\d+)\.?(\d+)?\.?(\d+)?'),
|
|
43
|
-
'safari': re.compile(r'Version/(\d+)\.(\d+)\.(\d+) Safari/(\d+)\.(\d+)\.(\d+)'),
|
|
44
|
-
'edge': re.compile(r'Edg/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
|
|
45
|
-
'edgios': re.compile(r'EdgiOS/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
|
|
46
|
-
'crios': re.compile(r'CriOS/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
for key, pattern in patterns.items():
|
|
50
|
-
match = pattern.search(user_agent)
|
|
51
|
-
if match:
|
|
52
|
-
return [match.group(i+1) for i in range(match.lastindex)]
|
|
53
|
-
|
|
54
|
-
# Fallback values if specific versions are not found
|
|
55
|
-
return ['99', '0', '0', '0']
|
|
56
|
-
|
|
57
|
-
def get_platform(user_agent):
|
|
58
|
-
"""
|
|
59
|
-
Determine the device platform from the user agent.
|
|
60
|
-
|
|
61
|
-
Parameters:
|
|
62
|
-
user_agent (str): User agent of the browser.
|
|
63
|
-
|
|
64
|
-
Returns:
|
|
65
|
-
str: Device platform.
|
|
66
|
-
"""
|
|
67
|
-
if 'Windows' in user_agent:
|
|
68
|
-
return '"Windows"'
|
|
69
|
-
elif 'Mac OS X' in user_agent:
|
|
70
|
-
return '"macOS"'
|
|
71
|
-
elif 'Android' in user_agent:
|
|
72
|
-
return '"Android"'
|
|
73
|
-
elif 'iPhone' in user_agent or 'iPad' in user_agent:
|
|
74
|
-
return '"iOS"'
|
|
75
|
-
elif 'Linux' in user_agent:
|
|
76
|
-
return '"Linux"'
|
|
77
|
-
return '"Unknown"'
|
|
78
|
-
|
|
79
|
-
def get_model(user_agent):
|
|
80
|
-
"""
|
|
81
|
-
Determine the device model from the user agent.
|
|
82
|
-
|
|
83
|
-
Parameters:
|
|
84
|
-
user_agent (str): User agent of the browser.
|
|
85
|
-
|
|
86
|
-
Returns:
|
|
87
|
-
str: Device model.
|
|
88
|
-
"""
|
|
89
|
-
if 'iPhone' in user_agent:
|
|
90
|
-
return '"iPhone"'
|
|
91
|
-
elif 'iPad' in user_agent:
|
|
92
|
-
return '"iPad"'
|
|
93
|
-
elif 'Android' in user_agent:
|
|
94
|
-
return '"Android"'
|
|
95
|
-
elif 'Windows' in user_agent:
|
|
96
|
-
return '"PC"'
|
|
97
|
-
elif 'Mac OS X' in user_agent:
|
|
98
|
-
return '"Mac"'
|
|
99
|
-
elif 'Linux' in user_agent:
|
|
100
|
-
return '"Linux"'
|
|
101
|
-
return '"Unknown"'
|
|
102
|
-
|
|
103
|
-
def random_headers(referer: str = None):
|
|
104
|
-
"""
|
|
105
|
-
Generate random HTTP headers to simulate human-like behavior.
|
|
106
|
-
|
|
107
|
-
Returns:
|
|
108
|
-
dict: Generated HTTP headers.
|
|
109
|
-
"""
|
|
110
|
-
user_agent = ua.random
|
|
111
|
-
versions = extract_versions(user_agent)
|
|
112
|
-
platform = get_platform(user_agent)
|
|
113
|
-
model = get_model(user_agent)
|
|
114
|
-
is_mobile = 'Mobi' in user_agent or 'Android' in user_agent
|
|
115
|
-
|
|
116
|
-
# Generate sec-ch-ua string based on the browser
|
|
117
|
-
if 'Chrome' in user_agent or 'CriOS' in user_agent:
|
|
118
|
-
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Chromium";v="{versions[0]}", "Google Chrome";v="{versions[0]}"'
|
|
119
|
-
elif 'Edg' in user_agent or 'EdgiOS' in user_agent:
|
|
120
|
-
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Chromium";v="{versions[0]}", "Microsoft Edge";v="{versions[0]}"'
|
|
121
|
-
elif 'Firefox' in user_agent:
|
|
122
|
-
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Firefox";v="{versions[0]}"'
|
|
123
|
-
elif 'Safari' in user_agent:
|
|
124
|
-
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Safari";v="{versions[0]}"'
|
|
125
|
-
else:
|
|
126
|
-
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}"'
|
|
127
|
-
|
|
128
|
-
headers = {
|
|
129
|
-
'User-Agent': user_agent,
|
|
130
|
-
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
|
|
131
|
-
'Accept-Language': random.choice(['en-US', 'en-GB', 'fr-FR', 'es-ES', 'de-DE']),
|
|
132
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
133
|
-
'Connection': 'keep-alive',
|
|
134
|
-
'Upgrade-Insecure-Requests': '1',
|
|
135
|
-
'Sec-Fetch-Dest': 'document',
|
|
136
|
-
'Sec-Fetch-Mode': 'navigate',
|
|
137
|
-
'Sec-Fetch-Site': 'none',
|
|
138
|
-
'Sec-Fetch-User': '?1',
|
|
139
|
-
'sec-ch-ua-mobile': '?1' if is_mobile else '?0',
|
|
140
|
-
'sec-ch-ua-platform': platform,
|
|
141
|
-
'sec-ch-ua': sec_ch_ua,
|
|
142
|
-
'sec-ch-ua-model': model
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
if referer:
|
|
146
|
-
headers['Origin'] = referer
|
|
147
|
-
headers['Referer'] = referer
|
|
148
|
-
|
|
149
|
-
return headers
|
|
150
|
-
|
|
151
|
-
def get_headers() -> str:
|
|
152
|
-
"""
|
|
153
|
-
Generate a random user agent to use in HTTP requests.
|
|
154
|
-
|
|
155
|
-
Returns:
|
|
156
|
-
- str: A random user agent string.
|
|
157
|
-
"""
|
|
158
|
-
|
|
159
|
-
# Get a random user agent string from the user agent rotator
|
|
1
|
+
# 4.04.24
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
import sys
|
|
5
|
+
import random
|
|
6
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# External library
|
|
10
|
+
from fake_useragent import UserAgent
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Variable
|
|
14
|
+
try:
|
|
15
|
+
ua_version = version('fake-useragent')
|
|
16
|
+
except PackageNotFoundError:
|
|
17
|
+
ua_version = None
|
|
18
|
+
|
|
19
|
+
if not getattr(sys, 'frozen', False):
|
|
20
|
+
if ua_version == '1.1.3':
|
|
21
|
+
ua = UserAgent(use_external_data=True)
|
|
22
|
+
else:
|
|
23
|
+
ua = UserAgent()
|
|
24
|
+
else:
|
|
25
|
+
ua = UserAgent()
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def extract_versions(user_agent):
|
|
29
|
+
"""
|
|
30
|
+
Extract browser versions from the user agent.
|
|
31
|
+
|
|
32
|
+
Parameters:
|
|
33
|
+
user_agent (str): User agent of the browser.
|
|
34
|
+
|
|
35
|
+
Returns:
|
|
36
|
+
list: List of browser versions.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
# Patterns to extract versions from various user agents
|
|
40
|
+
patterns = {
|
|
41
|
+
'chrome': re.compile(r'Chrome/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
|
|
42
|
+
'firefox': re.compile(r'Firefox/(\d+)\.?(\d+)?\.?(\d+)?'),
|
|
43
|
+
'safari': re.compile(r'Version/(\d+)\.(\d+)\.(\d+) Safari/(\d+)\.(\d+)\.(\d+)'),
|
|
44
|
+
'edge': re.compile(r'Edg/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
|
|
45
|
+
'edgios': re.compile(r'EdgiOS/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
|
|
46
|
+
'crios': re.compile(r'CriOS/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
for key, pattern in patterns.items():
|
|
50
|
+
match = pattern.search(user_agent)
|
|
51
|
+
if match:
|
|
52
|
+
return [match.group(i+1) for i in range(match.lastindex)]
|
|
53
|
+
|
|
54
|
+
# Fallback values if specific versions are not found
|
|
55
|
+
return ['99', '0', '0', '0']
|
|
56
|
+
|
|
57
|
+
def get_platform(user_agent):
|
|
58
|
+
"""
|
|
59
|
+
Determine the device platform from the user agent.
|
|
60
|
+
|
|
61
|
+
Parameters:
|
|
62
|
+
user_agent (str): User agent of the browser.
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
str: Device platform.
|
|
66
|
+
"""
|
|
67
|
+
if 'Windows' in user_agent:
|
|
68
|
+
return '"Windows"'
|
|
69
|
+
elif 'Mac OS X' in user_agent:
|
|
70
|
+
return '"macOS"'
|
|
71
|
+
elif 'Android' in user_agent:
|
|
72
|
+
return '"Android"'
|
|
73
|
+
elif 'iPhone' in user_agent or 'iPad' in user_agent:
|
|
74
|
+
return '"iOS"'
|
|
75
|
+
elif 'Linux' in user_agent:
|
|
76
|
+
return '"Linux"'
|
|
77
|
+
return '"Unknown"'
|
|
78
|
+
|
|
79
|
+
def get_model(user_agent):
|
|
80
|
+
"""
|
|
81
|
+
Determine the device model from the user agent.
|
|
82
|
+
|
|
83
|
+
Parameters:
|
|
84
|
+
user_agent (str): User agent of the browser.
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
str: Device model.
|
|
88
|
+
"""
|
|
89
|
+
if 'iPhone' in user_agent:
|
|
90
|
+
return '"iPhone"'
|
|
91
|
+
elif 'iPad' in user_agent:
|
|
92
|
+
return '"iPad"'
|
|
93
|
+
elif 'Android' in user_agent:
|
|
94
|
+
return '"Android"'
|
|
95
|
+
elif 'Windows' in user_agent:
|
|
96
|
+
return '"PC"'
|
|
97
|
+
elif 'Mac OS X' in user_agent:
|
|
98
|
+
return '"Mac"'
|
|
99
|
+
elif 'Linux' in user_agent:
|
|
100
|
+
return '"Linux"'
|
|
101
|
+
return '"Unknown"'
|
|
102
|
+
|
|
103
|
+
def random_headers(referer: str = None):
|
|
104
|
+
"""
|
|
105
|
+
Generate random HTTP headers to simulate human-like behavior.
|
|
106
|
+
|
|
107
|
+
Returns:
|
|
108
|
+
dict: Generated HTTP headers.
|
|
109
|
+
"""
|
|
110
|
+
user_agent = ua.random
|
|
111
|
+
versions = extract_versions(user_agent)
|
|
112
|
+
platform = get_platform(user_agent)
|
|
113
|
+
model = get_model(user_agent)
|
|
114
|
+
is_mobile = 'Mobi' in user_agent or 'Android' in user_agent
|
|
115
|
+
|
|
116
|
+
# Generate sec-ch-ua string based on the browser
|
|
117
|
+
if 'Chrome' in user_agent or 'CriOS' in user_agent:
|
|
118
|
+
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Chromium";v="{versions[0]}", "Google Chrome";v="{versions[0]}"'
|
|
119
|
+
elif 'Edg' in user_agent or 'EdgiOS' in user_agent:
|
|
120
|
+
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Chromium";v="{versions[0]}", "Microsoft Edge";v="{versions[0]}"'
|
|
121
|
+
elif 'Firefox' in user_agent:
|
|
122
|
+
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Firefox";v="{versions[0]}"'
|
|
123
|
+
elif 'Safari' in user_agent:
|
|
124
|
+
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Safari";v="{versions[0]}"'
|
|
125
|
+
else:
|
|
126
|
+
sec_ch_ua = f'" Not;A Brand";v="{versions[0]}"'
|
|
127
|
+
|
|
128
|
+
headers = {
|
|
129
|
+
'User-Agent': user_agent,
|
|
130
|
+
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
|
|
131
|
+
'Accept-Language': random.choice(['en-US', 'en-GB', 'fr-FR', 'es-ES', 'de-DE']),
|
|
132
|
+
'Accept-Encoding': 'gzip, deflate, br',
|
|
133
|
+
'Connection': 'keep-alive',
|
|
134
|
+
'Upgrade-Insecure-Requests': '1',
|
|
135
|
+
'Sec-Fetch-Dest': 'document',
|
|
136
|
+
'Sec-Fetch-Mode': 'navigate',
|
|
137
|
+
'Sec-Fetch-Site': 'none',
|
|
138
|
+
'Sec-Fetch-User': '?1',
|
|
139
|
+
'sec-ch-ua-mobile': '?1' if is_mobile else '?0',
|
|
140
|
+
'sec-ch-ua-platform': platform,
|
|
141
|
+
'sec-ch-ua': sec_ch_ua,
|
|
142
|
+
'sec-ch-ua-model': model
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if referer:
|
|
146
|
+
headers['Origin'] = referer
|
|
147
|
+
headers['Referer'] = referer
|
|
148
|
+
|
|
149
|
+
return headers
|
|
150
|
+
|
|
151
|
+
def get_headers() -> str:
|
|
152
|
+
"""
|
|
153
|
+
Generate a random user agent to use in HTTP requests.
|
|
154
|
+
|
|
155
|
+
Returns:
|
|
156
|
+
- str: A random user agent string.
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
# Get a random user agent string from the user agent rotator
|
|
160
160
|
return str(ua.chrome)
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
# 26.03.24
|
|
2
|
-
|
|
3
|
-
import os
|
|
4
|
-
import logging
|
|
5
|
-
from logging.handlers import RotatingFileHandler
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# Internal utilities
|
|
9
|
-
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Logger:
|
|
13
|
-
def __init__(self):
|
|
14
|
-
|
|
15
|
-
# Fetching configuration values
|
|
16
|
-
self.DEBUG_MODE = config_manager.get_bool("DEFAULT", "debug")
|
|
17
|
-
self.log_to_file = config_manager.get_bool("DEFAULT", "log_to_file")
|
|
18
|
-
self.log_file = config_manager.get("DEFAULT", "log_file") if self.log_to_file else None
|
|
19
|
-
|
|
20
|
-
logging.getLogger("httpx").setLevel(logging.WARNING)
|
|
21
|
-
logging.getLogger("httpcore").setLevel(logging.WARNING)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# Setting logging level based on DEBUG_MODE
|
|
25
|
-
if self.DEBUG_MODE:
|
|
26
|
-
logging.getLogger('root').setLevel(logging.DEBUG)
|
|
27
|
-
|
|
28
|
-
# Configure file logging if debug mode and logging to file are both enabled
|
|
29
|
-
if self.log_to_file:
|
|
30
|
-
self.remove_existing_log_file()
|
|
31
|
-
self.configure_file_logging()
|
|
32
|
-
else:
|
|
33
|
-
|
|
34
|
-
# If DEBUG_MODE is False, set logging level to ERROR
|
|
35
|
-
logging.getLogger('root').setLevel(logging.ERROR)
|
|
36
|
-
|
|
37
|
-
# Configure console logging
|
|
38
|
-
self.configure_logging()
|
|
39
|
-
|
|
40
|
-
def configure_logging(self):
|
|
41
|
-
"""
|
|
42
|
-
Configure console logging.
|
|
43
|
-
"""
|
|
44
|
-
logging.basicConfig(level=logging.DEBUG, format='[%(filename)s:%(lineno)s - %(funcName)20s() ] %(asctime)s - %(levelname)s - %(message)s')
|
|
45
|
-
|
|
46
|
-
def configure_file_logging(self):
|
|
47
|
-
"""
|
|
48
|
-
Configure file logging if enabled.
|
|
49
|
-
"""
|
|
50
|
-
|
|
51
|
-
file_handler = RotatingFileHandler(self.log_file, maxBytes=10*1024*1024, backupCount=5)
|
|
52
|
-
file_handler.setLevel(logging.DEBUG)
|
|
53
|
-
formatter = logging.Formatter('[%(filename)s:%(lineno)s - %(funcName)20s() ] %(asctime)s - %(levelname)s - %(message)s')
|
|
54
|
-
file_handler.setFormatter(formatter)
|
|
55
|
-
logging.getLogger('').addHandler(file_handler)
|
|
56
|
-
|
|
57
|
-
def remove_existing_log_file(self):
|
|
58
|
-
"""
|
|
59
|
-
Remove the log file if it already exists.
|
|
60
|
-
"""
|
|
61
|
-
if os.path.exists(self.log_file):
|
|
1
|
+
# 26.03.24
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import logging
|
|
5
|
+
from logging.handlers import RotatingFileHandler
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Internal utilities
|
|
9
|
+
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Logger:
|
|
13
|
+
def __init__(self):
|
|
14
|
+
|
|
15
|
+
# Fetching configuration values
|
|
16
|
+
self.DEBUG_MODE = config_manager.get_bool("DEFAULT", "debug")
|
|
17
|
+
self.log_to_file = config_manager.get_bool("DEFAULT", "log_to_file")
|
|
18
|
+
self.log_file = config_manager.get("DEFAULT", "log_file") if self.log_to_file else None
|
|
19
|
+
|
|
20
|
+
logging.getLogger("httpx").setLevel(logging.WARNING)
|
|
21
|
+
logging.getLogger("httpcore").setLevel(logging.WARNING)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# Setting logging level based on DEBUG_MODE
|
|
25
|
+
if self.DEBUG_MODE:
|
|
26
|
+
logging.getLogger('root').setLevel(logging.DEBUG)
|
|
27
|
+
|
|
28
|
+
# Configure file logging if debug mode and logging to file are both enabled
|
|
29
|
+
if self.log_to_file:
|
|
30
|
+
self.remove_existing_log_file()
|
|
31
|
+
self.configure_file_logging()
|
|
32
|
+
else:
|
|
33
|
+
|
|
34
|
+
# If DEBUG_MODE is False, set logging level to ERROR
|
|
35
|
+
logging.getLogger('root').setLevel(logging.ERROR)
|
|
36
|
+
|
|
37
|
+
# Configure console logging
|
|
38
|
+
self.configure_logging()
|
|
39
|
+
|
|
40
|
+
def configure_logging(self):
|
|
41
|
+
"""
|
|
42
|
+
Configure console logging.
|
|
43
|
+
"""
|
|
44
|
+
logging.basicConfig(level=logging.DEBUG, format='[%(filename)s:%(lineno)s - %(funcName)20s() ] %(asctime)s - %(levelname)s - %(message)s')
|
|
45
|
+
|
|
46
|
+
def configure_file_logging(self):
|
|
47
|
+
"""
|
|
48
|
+
Configure file logging if enabled.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
file_handler = RotatingFileHandler(self.log_file, maxBytes=10*1024*1024, backupCount=5)
|
|
52
|
+
file_handler.setLevel(logging.DEBUG)
|
|
53
|
+
formatter = logging.Formatter('[%(filename)s:%(lineno)s - %(funcName)20s() ] %(asctime)s - %(levelname)s - %(message)s')
|
|
54
|
+
file_handler.setFormatter(formatter)
|
|
55
|
+
logging.getLogger('').addHandler(file_handler)
|
|
56
|
+
|
|
57
|
+
def remove_existing_log_file(self):
|
|
58
|
+
"""
|
|
59
|
+
Remove the log file if it already exists.
|
|
60
|
+
"""
|
|
61
|
+
if os.path.exists(self.log_file):
|
|
62
62
|
os.remove(self.log_file)
|
|
@@ -1,64 +1,36 @@
|
|
|
1
|
-
# 3.12.23
|
|
2
|
-
|
|
3
|
-
import os
|
|
4
|
-
import platform
|
|
5
|
-
|
|
6
|
-
# Internal utilities
|
|
7
|
-
from StreamingCommunity.Util.console import console
|
|
8
|
-
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
#
|
|
36
|
-
|
|
37
|
-
colored_lines.append(colored_line)
|
|
38
|
-
|
|
39
|
-
# Join all colored lines back into a single string
|
|
40
|
-
return "\n".join(colored_lines)
|
|
41
|
-
|
|
42
|
-
def start_message():
|
|
43
|
-
"""Display a stylized start message in the console."""
|
|
44
|
-
|
|
45
|
-
msg = r'''
|
|
46
|
-
██╗ ██████╗ ██╗ ██╗██╗ ██╗ ██╗ ███████╗████████╗██████╗ ███████╗ █████╗ ███╗ ███╗██╗███╗ ██╗ ██████╗
|
|
47
|
-
██║ ██╔═══██╗██║ ██║██║ ╚██╗██╔╝ ██╔════╝╚══██╔══╝██╔══██╗██╔════╝██╔══██╗████╗ ████║██║████╗ ██║██╔════╝
|
|
48
|
-
██║ ██║ ██║██║ ██║██║ ╚███╔╝ ███████╗ ██║ ██████╔╝█████╗ ███████║██╔████╔██║██║██╔██╗ ██║██║ ███╗
|
|
49
|
-
██║ ██║ ██║╚██╗ ██╔╝██║ ██╔██╗ ╚════██║ ██║ ██╔══██╗██╔══╝ ██╔══██║██║╚██╔╝██║██║██║╚██╗██║██║ ██║
|
|
50
|
-
███████╗╚██████╔╝ ╚████╔╝ ██║ ██╔╝ ██╗ ███████║ ██║ ██║ ██║███████╗██║ ██║██║ ╚═╝ ██║██║██║ ╚████║╚██████╔╝
|
|
51
|
-
╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═════╝
|
|
52
|
-
'''.rstrip()
|
|
53
|
-
|
|
54
|
-
colored_msg = create_italian_flag_colored_text(msg)
|
|
55
|
-
|
|
56
|
-
if CLEAN:
|
|
57
|
-
os.system("cls" if platform.system() == 'Windows' else "clear")
|
|
58
|
-
|
|
59
|
-
if SHOW:
|
|
60
|
-
console.print(colored_msg)
|
|
61
|
-
|
|
62
|
-
# Print a decorative separator line using asterisks
|
|
63
|
-
separator = "_" * (console.width - 2) # Ridotto di 2 per il padding
|
|
64
|
-
console.print(f"[yellow]{separator}[/yellow]\n")
|
|
1
|
+
# 3.12.23
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import platform
|
|
5
|
+
|
|
6
|
+
# Internal utilities
|
|
7
|
+
from StreamingCommunity.Util.console import console
|
|
8
|
+
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Variable
|
|
12
|
+
CLEAN = config_manager.get_bool('DEFAULT', 'clean_console')
|
|
13
|
+
SHOW = config_manager.get_bool('DEFAULT', 'show_message')
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def start_message():
|
|
17
|
+
"""Display a stylized start message in the console."""
|
|
18
|
+
|
|
19
|
+
msg = r'''
|
|
20
|
+
___ _____ __ _
|
|
21
|
+
/ | ______________ _ ______ ______ _ __ / ___// /_________ ____ _____ ___ (_)___ ____ _
|
|
22
|
+
/ /| | / ___/ ___/ __ \ | /| / / __ `/ ___/ | |/_/ \__ \/ __/ ___/ _ \/ __ `/ __ `__ \/ / __ \/ __ `/
|
|
23
|
+
/ ___ |/ / / / / /_/ / |/ |/ / /_/ / / _> < ___/ / /_/ / / __/ /_/ / / / / / / / / / / /_/ /
|
|
24
|
+
/_/ |_/_/ /_/ \____/|__/|__/\__,_/_/ /_/|_| /____/\__/_/ \___/\__,_/_/ /_/ /_/_/_/ /_/\__, /
|
|
25
|
+
/____/
|
|
26
|
+
'''.rstrip()
|
|
27
|
+
|
|
28
|
+
if CLEAN:
|
|
29
|
+
os.system("cls" if platform.system() == 'Windows' else "clear")
|
|
30
|
+
|
|
31
|
+
if SHOW:
|
|
32
|
+
console.print(f"[purple]{msg}")
|
|
33
|
+
|
|
34
|
+
# Print a decorative separator line using asterisks
|
|
35
|
+
separator = "_" * (console.width - 2) # Ridotto di 2 per il padding
|
|
36
|
+
console.print(f"[cyan]{separator}[/cyan]\n")
|