StreamingCommunity 2.5.2__py3-none-any.whl → 2.5.6__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.

Files changed (268) hide show
  1. StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +143 -143
  2. StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +136 -136
  3. StreamingCommunity/Api/Player/ddl.py +89 -89
  4. StreamingCommunity/Api/Player/maxstream.py +151 -151
  5. StreamingCommunity/Api/Player/supervideo.py +193 -193
  6. StreamingCommunity/Api/Player/vixcloud.py +272 -272
  7. StreamingCommunity/Api/Site/1337xx/__init__.py +51 -50
  8. StreamingCommunity/Api/Site/1337xx/costant.py +14 -14
  9. StreamingCommunity/Api/Site/1337xx/site.py +87 -89
  10. StreamingCommunity/Api/Site/1337xx/title.py +63 -64
  11. StreamingCommunity/Api/Site/altadefinizionegratis/__init__.py +74 -50
  12. StreamingCommunity/Api/Site/altadefinizionegratis/costant.py +21 -19
  13. StreamingCommunity/Api/Site/altadefinizionegratis/film.py +81 -72
  14. StreamingCommunity/Api/Site/altadefinizionegratis/site.py +116 -94
  15. StreamingCommunity/Api/Site/animeunity/__init__.py +75 -50
  16. StreamingCommunity/Api/Site/animeunity/costant.py +21 -19
  17. StreamingCommunity/Api/Site/animeunity/film_serie.py +172 -134
  18. StreamingCommunity/Api/Site/animeunity/site.py +191 -174
  19. StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +97 -97
  20. StreamingCommunity/Api/Site/cb01new/__init__.py +51 -51
  21. StreamingCommunity/Api/Site/cb01new/costant.py +19 -19
  22. StreamingCommunity/Api/Site/cb01new/film.py +61 -71
  23. StreamingCommunity/Api/Site/cb01new/site.py +82 -82
  24. StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +55 -55
  25. StreamingCommunity/Api/Site/ddlstreamitaly/costant.py +20 -20
  26. StreamingCommunity/Api/Site/ddlstreamitaly/series.py +150 -145
  27. StreamingCommunity/Api/Site/ddlstreamitaly/site.py +98 -98
  28. StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +84 -84
  29. StreamingCommunity/Api/Site/guardaserie/__init__.py +50 -50
  30. StreamingCommunity/Api/Site/guardaserie/costant.py +19 -19
  31. StreamingCommunity/Api/Site/guardaserie/series.py +200 -198
  32. StreamingCommunity/Api/Site/guardaserie/site.py +89 -89
  33. StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +110 -110
  34. StreamingCommunity/Api/Site/ilcorsaronero/__init__.py +51 -51
  35. StreamingCommunity/Api/Site/ilcorsaronero/costant.py +18 -18
  36. StreamingCommunity/Api/Site/ilcorsaronero/site.py +71 -71
  37. StreamingCommunity/Api/Site/ilcorsaronero/title.py +44 -44
  38. StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +149 -149
  39. StreamingCommunity/Api/Site/mostraguarda/__init__.py +48 -48
  40. StreamingCommunity/Api/Site/mostraguarda/costant.py +18 -18
  41. StreamingCommunity/Api/Site/mostraguarda/film.py +90 -101
  42. StreamingCommunity/Api/Site/streamingcommunity/__init__.py +79 -55
  43. StreamingCommunity/Api/Site/streamingcommunity/costant.py +21 -19
  44. StreamingCommunity/Api/Site/streamingcommunity/film.py +86 -75
  45. StreamingCommunity/Api/Site/streamingcommunity/series.py +260 -207
  46. StreamingCommunity/Api/Site/streamingcommunity/site.py +156 -142
  47. StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +124 -124
  48. StreamingCommunity/Api/Template/Class/SearchType.py +101 -101
  49. StreamingCommunity/Api/Template/Util/__init__.py +4 -4
  50. StreamingCommunity/Api/Template/Util/get_domain.py +201 -201
  51. StreamingCommunity/Api/Template/Util/manage_ep.py +178 -178
  52. StreamingCommunity/Api/Template/Util/recall_search.py +37 -37
  53. StreamingCommunity/Api/Template/__init__.py +2 -2
  54. StreamingCommunity/Api/Template/site.py +87 -87
  55. StreamingCommunity/Lib/Downloader/HLS/downloader.py +529 -1008
  56. StreamingCommunity/Lib/Downloader/HLS/proxyes.py +110 -110
  57. StreamingCommunity/Lib/Downloader/HLS/segments.py +446 -573
  58. StreamingCommunity/Lib/Downloader/MP4/downloader.py +181 -155
  59. StreamingCommunity/Lib/Downloader/TOR/downloader.py +297 -295
  60. StreamingCommunity/Lib/Downloader/__init__.py +4 -4
  61. StreamingCommunity/Lib/FFmpeg/__init__.py +4 -4
  62. StreamingCommunity/Lib/FFmpeg/capture.py +170 -170
  63. StreamingCommunity/Lib/FFmpeg/command.py +264 -296
  64. StreamingCommunity/Lib/FFmpeg/util.py +248 -248
  65. StreamingCommunity/Lib/M3U8/__init__.py +5 -5
  66. StreamingCommunity/Lib/M3U8/decryptor.py +164 -164
  67. StreamingCommunity/Lib/M3U8/estimator.py +146 -228
  68. StreamingCommunity/Lib/M3U8/parser.py +666 -666
  69. StreamingCommunity/Lib/M3U8/url_fixer.py +57 -57
  70. StreamingCommunity/Lib/TMBD/__init__.py +1 -1
  71. StreamingCommunity/Lib/TMBD/obj_tmbd.py +39 -39
  72. StreamingCommunity/Lib/TMBD/tmdb.py +345 -345
  73. StreamingCommunity/TelegramHelp/__init__.py +0 -0
  74. StreamingCommunity/TelegramHelp/request_manager.py +82 -0
  75. StreamingCommunity/TelegramHelp/session.py +56 -0
  76. StreamingCommunity/TelegramHelp/telegram_bot.py +561 -0
  77. StreamingCommunity/Upload/update.py +75 -67
  78. StreamingCommunity/Upload/version.py +5 -5
  79. StreamingCommunity/Util/_jsonConfig.py +227 -228
  80. StreamingCommunity/Util/call_stack.py +42 -42
  81. StreamingCommunity/Util/color.py +20 -20
  82. StreamingCommunity/Util/console.py +12 -12
  83. StreamingCommunity/Util/ffmpeg_installer.py +342 -370
  84. StreamingCommunity/Util/headers.py +159 -159
  85. StreamingCommunity/Util/logger.py +61 -61
  86. StreamingCommunity/Util/message.py +36 -64
  87. StreamingCommunity/Util/os.py +500 -507
  88. StreamingCommunity/Util/table.py +271 -228
  89. StreamingCommunity/run.py +352 -245
  90. {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.6.dist-info}/LICENSE +674 -674
  91. {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.6.dist-info}/METADATA +601 -543
  92. StreamingCommunity-2.5.6.dist-info/RECORD +96 -0
  93. {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.6.dist-info}/entry_points.txt +0 -1
  94. StreamingCommunity/Api/Player/Helper/Vixcloud/__pycache__/js_parser.cpython-313.pyc +0 -0
  95. StreamingCommunity/Api/Player/Helper/Vixcloud/__pycache__/js_parser.cpython-39.pyc +0 -0
  96. StreamingCommunity/Api/Player/Helper/Vixcloud/__pycache__/util.cpython-313.pyc +0 -0
  97. StreamingCommunity/Api/Player/Helper/Vixcloud/__pycache__/util.cpython-39.pyc +0 -0
  98. StreamingCommunity/Api/Player/__pycache__/ddl.cpython-313.pyc +0 -0
  99. StreamingCommunity/Api/Player/__pycache__/ddl.cpython-39.pyc +0 -0
  100. StreamingCommunity/Api/Player/__pycache__/maxstream.cpython-313.pyc +0 -0
  101. StreamingCommunity/Api/Player/__pycache__/maxstream.cpython-39.pyc +0 -0
  102. StreamingCommunity/Api/Player/__pycache__/supervideo.cpython-313.pyc +0 -0
  103. StreamingCommunity/Api/Player/__pycache__/supervideo.cpython-39.pyc +0 -0
  104. StreamingCommunity/Api/Player/__pycache__/vixcloud.cpython-313.pyc +0 -0
  105. StreamingCommunity/Api/Player/__pycache__/vixcloud.cpython-39.pyc +0 -0
  106. StreamingCommunity/Api/Site/1337xx/__pycache__/__init__.cpython-313.pyc +0 -0
  107. StreamingCommunity/Api/Site/1337xx/__pycache__/__init__.cpython-39.pyc +0 -0
  108. StreamingCommunity/Api/Site/1337xx/__pycache__/costant.cpython-313.pyc +0 -0
  109. StreamingCommunity/Api/Site/1337xx/__pycache__/costant.cpython-39.pyc +0 -0
  110. StreamingCommunity/Api/Site/1337xx/__pycache__/site.cpython-313.pyc +0 -0
  111. StreamingCommunity/Api/Site/1337xx/__pycache__/site.cpython-39.pyc +0 -0
  112. StreamingCommunity/Api/Site/1337xx/__pycache__/title.cpython-313.pyc +0 -0
  113. StreamingCommunity/Api/Site/1337xx/__pycache__/title.cpython-39.pyc +0 -0
  114. StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/__init__.cpython-313.pyc +0 -0
  115. StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/__init__.cpython-39.pyc +0 -0
  116. StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/costant.cpython-313.pyc +0 -0
  117. StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/costant.cpython-39.pyc +0 -0
  118. StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/film.cpython-313.pyc +0 -0
  119. StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/film.cpython-39.pyc +0 -0
  120. StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/site.cpython-313.pyc +0 -0
  121. StreamingCommunity/Api/Site/altadefinizionegratis/__pycache__/site.cpython-39.pyc +0 -0
  122. StreamingCommunity/Api/Site/animeunity/__pycache__/__init__.cpython-313.pyc +0 -0
  123. StreamingCommunity/Api/Site/animeunity/__pycache__/__init__.cpython-39.pyc +0 -0
  124. StreamingCommunity/Api/Site/animeunity/__pycache__/costant.cpython-313.pyc +0 -0
  125. StreamingCommunity/Api/Site/animeunity/__pycache__/costant.cpython-39.pyc +0 -0
  126. StreamingCommunity/Api/Site/animeunity/__pycache__/film_serie.cpython-313.pyc +0 -0
  127. StreamingCommunity/Api/Site/animeunity/__pycache__/film_serie.cpython-39.pyc +0 -0
  128. StreamingCommunity/Api/Site/animeunity/__pycache__/site.cpython-313.pyc +0 -0
  129. StreamingCommunity/Api/Site/animeunity/__pycache__/site.cpython-39.pyc +0 -0
  130. StreamingCommunity/Api/Site/animeunity/util/__pycache__/ScrapeSerie.cpython-313.pyc +0 -0
  131. StreamingCommunity/Api/Site/animeunity/util/__pycache__/ScrapeSerie.cpython-39.pyc +0 -0
  132. StreamingCommunity/Api/Site/cb01new/__pycache__/__init__.cpython-313.pyc +0 -0
  133. StreamingCommunity/Api/Site/cb01new/__pycache__/__init__.cpython-39.pyc +0 -0
  134. StreamingCommunity/Api/Site/cb01new/__pycache__/costant.cpython-313.pyc +0 -0
  135. StreamingCommunity/Api/Site/cb01new/__pycache__/costant.cpython-39.pyc +0 -0
  136. StreamingCommunity/Api/Site/cb01new/__pycache__/film.cpython-313.pyc +0 -0
  137. StreamingCommunity/Api/Site/cb01new/__pycache__/film.cpython-39.pyc +0 -0
  138. StreamingCommunity/Api/Site/cb01new/__pycache__/site.cpython-313.pyc +0 -0
  139. StreamingCommunity/Api/Site/cb01new/__pycache__/site.cpython-39.pyc +0 -0
  140. StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/__init__.cpython-313.pyc +0 -0
  141. StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/__init__.cpython-39.pyc +0 -0
  142. StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/costant.cpython-313.pyc +0 -0
  143. StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/costant.cpython-39.pyc +0 -0
  144. StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/series.cpython-313.pyc +0 -0
  145. StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/series.cpython-39.pyc +0 -0
  146. StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/site.cpython-313.pyc +0 -0
  147. StreamingCommunity/Api/Site/ddlstreamitaly/__pycache__/site.cpython-39.pyc +0 -0
  148. StreamingCommunity/Api/Site/ddlstreamitaly/util/__pycache__/ScrapeSerie.cpython-313.pyc +0 -0
  149. StreamingCommunity/Api/Site/ddlstreamitaly/util/__pycache__/ScrapeSerie.cpython-39.pyc +0 -0
  150. StreamingCommunity/Api/Site/guardaserie/__pycache__/__init__.cpython-313.pyc +0 -0
  151. StreamingCommunity/Api/Site/guardaserie/__pycache__/__init__.cpython-39.pyc +0 -0
  152. StreamingCommunity/Api/Site/guardaserie/__pycache__/costant.cpython-313.pyc +0 -0
  153. StreamingCommunity/Api/Site/guardaserie/__pycache__/costant.cpython-39.pyc +0 -0
  154. StreamingCommunity/Api/Site/guardaserie/__pycache__/series.cpython-313.pyc +0 -0
  155. StreamingCommunity/Api/Site/guardaserie/__pycache__/series.cpython-39.pyc +0 -0
  156. StreamingCommunity/Api/Site/guardaserie/__pycache__/site.cpython-313.pyc +0 -0
  157. StreamingCommunity/Api/Site/guardaserie/__pycache__/site.cpython-39.pyc +0 -0
  158. StreamingCommunity/Api/Site/guardaserie/util/__pycache__/ScrapeSerie.cpython-313.pyc +0 -0
  159. StreamingCommunity/Api/Site/guardaserie/util/__pycache__/ScrapeSerie.cpython-39.pyc +0 -0
  160. StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/__init__.cpython-313.pyc +0 -0
  161. StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/__init__.cpython-39.pyc +0 -0
  162. StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/costant.cpython-313.pyc +0 -0
  163. StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/costant.cpython-39.pyc +0 -0
  164. StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/site.cpython-313.pyc +0 -0
  165. StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/site.cpython-39.pyc +0 -0
  166. StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/title.cpython-313.pyc +0 -0
  167. StreamingCommunity/Api/Site/ilcorsaronero/__pycache__/title.cpython-39.pyc +0 -0
  168. StreamingCommunity/Api/Site/ilcorsaronero/util/__pycache__/ilCorsarScraper.cpython-313.pyc +0 -0
  169. StreamingCommunity/Api/Site/ilcorsaronero/util/__pycache__/ilCorsarScraper.cpython-39.pyc +0 -0
  170. StreamingCommunity/Api/Site/mostraguarda/__pycache__/__init__.cpython-313.pyc +0 -0
  171. StreamingCommunity/Api/Site/mostraguarda/__pycache__/__init__.cpython-39.pyc +0 -0
  172. StreamingCommunity/Api/Site/mostraguarda/__pycache__/costant.cpython-313.pyc +0 -0
  173. StreamingCommunity/Api/Site/mostraguarda/__pycache__/costant.cpython-39.pyc +0 -0
  174. StreamingCommunity/Api/Site/mostraguarda/__pycache__/film.cpython-313.pyc +0 -0
  175. StreamingCommunity/Api/Site/mostraguarda/__pycache__/film.cpython-39.pyc +0 -0
  176. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/__init__.cpython-313.pyc +0 -0
  177. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/__init__.cpython-39.pyc +0 -0
  178. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/costant.cpython-313.pyc +0 -0
  179. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/costant.cpython-39.pyc +0 -0
  180. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/film.cpython-313.pyc +0 -0
  181. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/film.cpython-39.pyc +0 -0
  182. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/series.cpython-313.pyc +0 -0
  183. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/series.cpython-39.pyc +0 -0
  184. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/site.cpython-313.pyc +0 -0
  185. StreamingCommunity/Api/Site/streamingcommunity/__pycache__/site.cpython-39.pyc +0 -0
  186. StreamingCommunity/Api/Site/streamingcommunity/util/__pycache__/ScrapeSerie.cpython-313.pyc +0 -0
  187. StreamingCommunity/Api/Site/streamingcommunity/util/__pycache__/ScrapeSerie.cpython-39.pyc +0 -0
  188. StreamingCommunity/Api/Template/Class/__pycache__/SearchType.cpython-313.pyc +0 -0
  189. StreamingCommunity/Api/Template/Class/__pycache__/SearchType.cpython-39.pyc +0 -0
  190. StreamingCommunity/Api/Template/Util/__pycache__/__init__.cpython-313.pyc +0 -0
  191. StreamingCommunity/Api/Template/Util/__pycache__/__init__.cpython-39.pyc +0 -0
  192. StreamingCommunity/Api/Template/Util/__pycache__/get_domain.cpython-313.pyc +0 -0
  193. StreamingCommunity/Api/Template/Util/__pycache__/get_domain.cpython-39.pyc +0 -0
  194. StreamingCommunity/Api/Template/Util/__pycache__/manage_ep.cpython-313.pyc +0 -0
  195. StreamingCommunity/Api/Template/Util/__pycache__/manage_ep.cpython-39.pyc +0 -0
  196. StreamingCommunity/Api/Template/Util/__pycache__/recall_search.cpython-313.pyc +0 -0
  197. StreamingCommunity/Api/Template/Util/__pycache__/recall_search.cpython-39.pyc +0 -0
  198. StreamingCommunity/Api/Template/__pycache__/__init__.cpython-313.pyc +0 -0
  199. StreamingCommunity/Api/Template/__pycache__/__init__.cpython-39.pyc +0 -0
  200. StreamingCommunity/Api/Template/__pycache__/site.cpython-313.pyc +0 -0
  201. StreamingCommunity/Api/Template/__pycache__/site.cpython-39.pyc +0 -0
  202. StreamingCommunity/Lib/Downloader/HLS/__pycache__/downloader.cpython-313.pyc +0 -0
  203. StreamingCommunity/Lib/Downloader/HLS/__pycache__/downloader.cpython-39.pyc +0 -0
  204. StreamingCommunity/Lib/Downloader/HLS/__pycache__/proxyes.cpython-313.pyc +0 -0
  205. StreamingCommunity/Lib/Downloader/HLS/__pycache__/proxyes.cpython-39.pyc +0 -0
  206. StreamingCommunity/Lib/Downloader/HLS/__pycache__/segments.cpython-313.pyc +0 -0
  207. StreamingCommunity/Lib/Downloader/HLS/__pycache__/segments.cpython-39.pyc +0 -0
  208. StreamingCommunity/Lib/Downloader/MP4/__pycache__/downloader.cpython-313.pyc +0 -0
  209. StreamingCommunity/Lib/Downloader/MP4/__pycache__/downloader.cpython-39.pyc +0 -0
  210. StreamingCommunity/Lib/Downloader/TOR/__pycache__/downloader.cpython-313.pyc +0 -0
  211. StreamingCommunity/Lib/Downloader/TOR/__pycache__/downloader.cpython-39.pyc +0 -0
  212. StreamingCommunity/Lib/Downloader/__pycache__/__init__.cpython-313.pyc +0 -0
  213. StreamingCommunity/Lib/Downloader/__pycache__/__init__.cpython-39.pyc +0 -0
  214. StreamingCommunity/Lib/FFmpeg/__pycache__/__init__.cpython-313.pyc +0 -0
  215. StreamingCommunity/Lib/FFmpeg/__pycache__/__init__.cpython-39.pyc +0 -0
  216. StreamingCommunity/Lib/FFmpeg/__pycache__/capture.cpython-313.pyc +0 -0
  217. StreamingCommunity/Lib/FFmpeg/__pycache__/capture.cpython-39.pyc +0 -0
  218. StreamingCommunity/Lib/FFmpeg/__pycache__/command.cpython-313.pyc +0 -0
  219. StreamingCommunity/Lib/FFmpeg/__pycache__/command.cpython-39.pyc +0 -0
  220. StreamingCommunity/Lib/FFmpeg/__pycache__/util.cpython-313.pyc +0 -0
  221. StreamingCommunity/Lib/FFmpeg/__pycache__/util.cpython-39.pyc +0 -0
  222. StreamingCommunity/Lib/M3U8/__pycache__/__init__.cpython-313.pyc +0 -0
  223. StreamingCommunity/Lib/M3U8/__pycache__/__init__.cpython-39.pyc +0 -0
  224. StreamingCommunity/Lib/M3U8/__pycache__/decryptor.cpython-313.pyc +0 -0
  225. StreamingCommunity/Lib/M3U8/__pycache__/decryptor.cpython-39.pyc +0 -0
  226. StreamingCommunity/Lib/M3U8/__pycache__/estimator.cpython-313.pyc +0 -0
  227. StreamingCommunity/Lib/M3U8/__pycache__/estimator.cpython-39.pyc +0 -0
  228. StreamingCommunity/Lib/M3U8/__pycache__/parser.cpython-313.pyc +0 -0
  229. StreamingCommunity/Lib/M3U8/__pycache__/parser.cpython-39.pyc +0 -0
  230. StreamingCommunity/Lib/M3U8/__pycache__/url_fixer.cpython-313.pyc +0 -0
  231. StreamingCommunity/Lib/M3U8/__pycache__/url_fixer.cpython-39.pyc +0 -0
  232. StreamingCommunity/Lib/TMBD/__pycache__/__init__.cpython-313.pyc +0 -0
  233. StreamingCommunity/Lib/TMBD/__pycache__/__init__.cpython-39.pyc +0 -0
  234. StreamingCommunity/Lib/TMBD/__pycache__/obj_tmbd.cpython-313.pyc +0 -0
  235. StreamingCommunity/Lib/TMBD/__pycache__/obj_tmbd.cpython-39.pyc +0 -0
  236. StreamingCommunity/Lib/TMBD/__pycache__/tmdb.cpython-313.pyc +0 -0
  237. StreamingCommunity/Lib/TMBD/__pycache__/tmdb.cpython-39.pyc +0 -0
  238. StreamingCommunity/Upload/__pycache__/update.cpython-313.pyc +0 -0
  239. StreamingCommunity/Upload/__pycache__/update.cpython-39.pyc +0 -0
  240. StreamingCommunity/Upload/__pycache__/version.cpython-313.pyc +0 -0
  241. StreamingCommunity/Upload/__pycache__/version.cpython-39.pyc +0 -0
  242. StreamingCommunity/Util/__pycache__/_jsonConfig.cpython-313.pyc +0 -0
  243. StreamingCommunity/Util/__pycache__/_jsonConfig.cpython-39.pyc +0 -0
  244. StreamingCommunity/Util/__pycache__/call_stack.cpython-313.pyc +0 -0
  245. StreamingCommunity/Util/__pycache__/call_stack.cpython-39.pyc +0 -0
  246. StreamingCommunity/Util/__pycache__/color.cpython-313.pyc +0 -0
  247. StreamingCommunity/Util/__pycache__/color.cpython-39.pyc +0 -0
  248. StreamingCommunity/Util/__pycache__/console.cpython-313.pyc +0 -0
  249. StreamingCommunity/Util/__pycache__/console.cpython-39.pyc +0 -0
  250. StreamingCommunity/Util/__pycache__/ffmpeg_installer.cpython-313.pyc +0 -0
  251. StreamingCommunity/Util/__pycache__/ffmpeg_installer.cpython-39.pyc +0 -0
  252. StreamingCommunity/Util/__pycache__/headers.cpython-313.pyc +0 -0
  253. StreamingCommunity/Util/__pycache__/headers.cpython-39.pyc +0 -0
  254. StreamingCommunity/Util/__pycache__/logger.cpython-313.pyc +0 -0
  255. StreamingCommunity/Util/__pycache__/logger.cpython-39.pyc +0 -0
  256. StreamingCommunity/Util/__pycache__/message.cpython-313.pyc +0 -0
  257. StreamingCommunity/Util/__pycache__/message.cpython-39.pyc +0 -0
  258. StreamingCommunity/Util/__pycache__/os.cpython-313.pyc +0 -0
  259. StreamingCommunity/Util/__pycache__/os.cpython-39.pyc +0 -0
  260. StreamingCommunity/Util/__pycache__/table.cpython-313.pyc +0 -0
  261. StreamingCommunity/Util/__pycache__/table.cpython-39.pyc +0 -0
  262. StreamingCommunity/__pycache__/__init__.cpython-313.pyc +0 -0
  263. StreamingCommunity/__pycache__/__init__.cpython-39.pyc +0 -0
  264. StreamingCommunity/__pycache__/run.cpython-313.pyc +0 -0
  265. StreamingCommunity/__pycache__/run.cpython-39.pyc +0 -0
  266. StreamingCommunity-2.5.2.dist-info/RECORD +0 -264
  267. {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.6.dist-info}/WHEEL +0 -0
  268. {StreamingCommunity-2.5.2.dist-info → StreamingCommunity-2.5.6.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
- from typing import Callable
12
-
13
-
14
- # Internal utilities
15
- from StreamingCommunity.Util.message import start_message
16
- from StreamingCommunity.Util.console import console, msg
17
- from StreamingCommunity.Util._jsonConfig import config_manager
18
- from StreamingCommunity.Upload.update import update as git_update
19
- from StreamingCommunity.Util.os import os_summary
20
- from StreamingCommunity.Util.logger import Logger
21
-
22
-
23
- # Config
24
- CLOSE_CONSOLE = config_manager.get_bool('DEFAULT', 'not_close')
25
-
26
-
27
- def run_function(func: Callable[..., None], close_console: bool = False) -> None:
28
- """
29
- Run a given function indefinitely or once, depending on the value of close_console.
30
-
31
- Parameters:
32
- func (Callable[..., None]): The function to run.
33
- close_console (bool, optional): Whether to close the console after running the function once. Defaults to False.
34
- """
35
- if close_console:
36
- while 1:
37
- func()
38
- else:
39
- func()
40
-
41
-
42
- def load_search_functions():
43
- modules = []
44
- loaded_functions = {}
45
-
46
- # Find api home directory
47
- if getattr(sys, 'frozen', False): # Modalità PyInstaller
48
- base_path = os.path.join(sys._MEIPASS, "StreamingCommunity")
49
- else:
50
- base_path = os.path.dirname(__file__)
51
-
52
- api_dir = os.path.join(base_path, 'Api', 'Site')
53
- init_files = glob.glob(os.path.join(api_dir, '*', '__init__.py'))
54
-
55
- # Retrieve modules and their indices
56
- for init_file in init_files:
57
-
58
- # Get folder name as module name
59
- module_name = os.path.basename(os.path.dirname(init_file))
60
- logging.info(f"Load module name: {module_name}")
61
-
62
- try:
63
- # Dynamically import the module
64
- mod = importlib.import_module(f'StreamingCommunity.Api.Site.{module_name}')
65
-
66
- # Get 'indice' from the module
67
- indice = getattr(mod, 'indice', 0)
68
- is_deprecate = bool(getattr(mod, '_deprecate', True))
69
- use_for = getattr(mod, '_useFor', 'other')
70
-
71
- if not is_deprecate:
72
- modules.append((module_name, indice, use_for))
73
-
74
- except Exception as e:
75
- console.print(f"[red]Failed to import module {module_name}: {str(e)}")
76
-
77
- # Sort modules by 'indice'
78
- modules.sort(key=lambda x: x[1])
79
-
80
- # Load search functions in the sorted order
81
- for module_name, _, use_for in modules:
82
-
83
- # Construct a unique alias for the module
84
- module_alias = f'{module_name}_search'
85
-
86
- try:
87
-
88
- # Dynamically import the module
89
- mod = importlib.import_module(f'StreamingCommunity.Api.Site.{module_name}')
90
-
91
- # Get the search function from the module (assuming the function is named 'search' and defined in __init__.py)
92
- search_function = getattr(mod, 'search')
93
-
94
- # Add the function to the loaded functions dictionary
95
- loaded_functions[module_alias] = (search_function, use_for)
96
-
97
- except Exception as e:
98
- console.print(f"[red]Failed to load search function from module {module_name}: {str(e)}")
99
-
100
- return loaded_functions
101
-
102
-
103
- def initialize():
104
-
105
- # Get start message
106
- start_message()
107
-
108
- # Get system info
109
- os_summary.get_system_summary()
110
-
111
- # Set terminal size for win 7
112
- if platform.system() == "Windows" and "7" in platform.version():
113
- os.system('mode 120, 40')
114
-
115
- # Check python version
116
- if sys.version_info < (3, 7):
117
- console.log("[red]Install python version > 3.7.16")
118
- sys.exit(0)
119
-
120
- # Attempting GitHub update
121
- try:
122
- git_update()
123
- except:
124
- console.log("[red]Error with loading github.")
125
-
126
-
127
- def main():
128
- start = time.time()
129
-
130
- # Create logger
131
- log_not = Logger()
132
- initialize()
133
-
134
- # Load search functions
135
- search_functions = load_search_functions()
136
- logging.info(f"Load module in: {time.time() - start} s")
137
-
138
- # Create argument parser
139
- parser = argparse.ArgumentParser(
140
- description='Script to download movies and series from the internet. Use these commands to configure the script and control its behavior.'
141
- )
142
-
143
- # Add arguments for the main configuration parameters
144
- parser.add_argument(
145
- '--add_siteName', type=bool, help='Enable or disable adding the site name to the file name (e.g., true/false).'
146
- )
147
- parser.add_argument(
148
- '--disable_searchDomain', type=bool, help='Enable or disable searching in configured domains (e.g., true/false).'
149
- )
150
- parser.add_argument(
151
- '--not_close', type=bool, help='If set to true, the script will not close the console after execution (e.g., true/false).'
152
- )
153
-
154
- # Add arguments for M3U8 configuration
155
- parser.add_argument(
156
- '--default_video_worker', type=int, help='Number of workers for video during M3U8 download (default: 12).'
157
- )
158
- parser.add_argument(
159
- '--default_audio_worker', type=int, help='Number of workers for audio during M3U8 download (default: 12).'
160
- )
161
-
162
- # Add options for audio and subtitles
163
- parser.add_argument(
164
- '--specific_list_audio', type=str, help='Comma-separated list of specific audio languages to download (e.g., ita,eng).'
165
- )
166
- parser.add_argument(
167
- '--specific_list_subtitles', type=str, help='Comma-separated list of specific subtitle languages to download (e.g., eng,spa).'
168
- )
169
-
170
- # Add arguments for search functions
171
- color_map = {
172
- "anime": "red",
173
- "film_serie": "yellow",
174
- "film": "blue",
175
- "serie": "green",
176
- "other": "white"
177
- }
178
-
179
- # Add dynamic arguments based on loaded search modules
180
- for alias, (_, use_for) in search_functions.items():
181
- short_option = alias[:3].upper()
182
- long_option = alias
183
- parser.add_argument(f'-{short_option}', f'--{long_option}', action='store_true', help=f'Search for {alias.split("_")[0]} on streaming platforms.')
184
-
185
- # Parse command-line arguments
186
- args = parser.parse_args()
187
-
188
- # Map command-line arguments to the config values
189
- config_updates = {}
190
-
191
- if args.add_siteName is not None:
192
- config_updates['DEFAULT.add_siteName'] = args.add_siteName
193
- if args.disable_searchDomain is not None:
194
- config_updates['DEFAULT.disable_searchDomain'] = args.disable_searchDomain
195
- if args.not_close is not None:
196
- config_updates['DEFAULT.not_close'] = args.not_close
197
- if args.default_video_worker is not None:
198
- config_updates['M3U8_DOWNLOAD.default_video_worker'] = args.default_video_worker
199
- if args.default_audio_worker is not None:
200
- config_updates['M3U8_DOWNLOAD.default_audio_worker'] = args.default_audio_worker
201
- if args.specific_list_audio is not None:
202
- config_updates['M3U8_DOWNLOAD.specific_list_audio'] = args.specific_list_audio.split(',')
203
- if args.specific_list_subtitles is not None:
204
- config_updates['M3U8_DOWNLOAD.specific_list_subtitles'] = args.specific_list_subtitles.split(',')
205
-
206
- # Apply the updates to the config file
207
- for key, value in config_updates.items():
208
- section, option = key.split('.')
209
- config_manager.set_key(section, option, value)
210
-
211
- config_manager.write_config()
212
-
213
- # Map command-line arguments to functions
214
- arg_to_function = {alias: func for alias, (func, _) in search_functions.items()}
215
-
216
- # Check which argument is provided and run the corresponding function
217
- for arg, func in arg_to_function.items():
218
- if getattr(args, arg):
219
- run_function(func)
220
- return
221
-
222
- # Mapping user input to functions
223
- input_to_function = {str(i): func for i, (alias, (func, _)) in enumerate(search_functions.items())}
224
-
225
- # Create dynamic prompt message and choices
226
- choice_labels = {str(i): (alias.split("_")[0].capitalize(), use_for) for i, (alias, (_, use_for)) in enumerate(search_functions.items())}
227
-
228
- # Display the category legend in a single line
229
- legend_text = " | ".join([f"[{color}]{category.capitalize()}[/{color}]" for category, color in color_map.items()])
230
- console.print(f"\n[bold green]Category Legend:[/bold green] {legend_text}")
231
-
232
- # Construct the prompt message with color-coded site names
233
- prompt_message = "[green]Insert category [white](" + ", ".join(
234
- [f"{key}: [{color_map[label[1]]}]{label[0]}[/{color_map[label[1]]}]" for key, label in choice_labels.items()]
235
- ) + "[white])"
236
-
237
- # Ask the user for input
238
- category = msg.ask(prompt_message, choices=list(choice_labels.keys()), default="0", show_choices=False, show_default=False)
239
-
240
- # Run the corresponding function based on user input
241
- if category in input_to_function:
242
- run_function(input_to_function[category])
243
- else:
244
- console.print("[red]Invalid category.")
245
- sys.exit(0)
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)