StreamingCommunity 1.7.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 (97) hide show
  1. StreamingCommunity/Src/Api/Player/Helper/Vixcloud/js_parser.py +140 -0
  2. StreamingCommunity/Src/Api/Player/Helper/Vixcloud/util.py +166 -0
  3. StreamingCommunity/Src/Api/Player/ddl.py +89 -0
  4. StreamingCommunity/Src/Api/Player/maxstream.py +151 -0
  5. StreamingCommunity/Src/Api/Player/supervideo.py +194 -0
  6. StreamingCommunity/Src/Api/Player/vixcloud.py +212 -0
  7. StreamingCommunity/Src/Api/Site/1337xx/__init__.py +50 -0
  8. StreamingCommunity/Src/Api/Site/1337xx/costant.py +15 -0
  9. StreamingCommunity/Src/Api/Site/1337xx/site.py +84 -0
  10. StreamingCommunity/Src/Api/Site/1337xx/title.py +66 -0
  11. StreamingCommunity/Src/Api/Site/altadefinizione/__init__.py +50 -0
  12. StreamingCommunity/Src/Api/Site/altadefinizione/costant.py +15 -0
  13. StreamingCommunity/Src/Api/Site/altadefinizione/film.py +69 -0
  14. StreamingCommunity/Src/Api/Site/altadefinizione/site.py +86 -0
  15. StreamingCommunity/Src/Api/Site/animeunity/__init__.py +50 -0
  16. StreamingCommunity/Src/Api/Site/animeunity/anime.py +126 -0
  17. StreamingCommunity/Src/Api/Site/animeunity/costant.py +15 -0
  18. StreamingCommunity/Src/Api/Site/animeunity/film_serie.py +131 -0
  19. StreamingCommunity/Src/Api/Site/animeunity/site.py +165 -0
  20. StreamingCommunity/Src/Api/Site/animeunity/util/ScrapeSerie.py +97 -0
  21. StreamingCommunity/Src/Api/Site/bitsearch/__init__.py +51 -0
  22. StreamingCommunity/Src/Api/Site/bitsearch/costant.py +15 -0
  23. StreamingCommunity/Src/Api/Site/bitsearch/site.py +84 -0
  24. StreamingCommunity/Src/Api/Site/bitsearch/title.py +47 -0
  25. StreamingCommunity/Src/Api/Site/cb01new/__init__.py +51 -0
  26. StreamingCommunity/Src/Api/Site/cb01new/costant.py +15 -0
  27. StreamingCommunity/Src/Api/Site/cb01new/film.py +69 -0
  28. StreamingCommunity/Src/Api/Site/cb01new/site.py +74 -0
  29. StreamingCommunity/Src/Api/Site/ddlstreamitaly/Player/ScrapeSerie.py +83 -0
  30. StreamingCommunity/Src/Api/Site/ddlstreamitaly/__init__.py +57 -0
  31. StreamingCommunity/Src/Api/Site/ddlstreamitaly/costant.py +16 -0
  32. StreamingCommunity/Src/Api/Site/ddlstreamitaly/series.py +142 -0
  33. StreamingCommunity/Src/Api/Site/ddlstreamitaly/site.py +93 -0
  34. StreamingCommunity/Src/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +83 -0
  35. StreamingCommunity/Src/Api/Site/guardaserie/Player/ScrapeSerie.py +110 -0
  36. StreamingCommunity/Src/Api/Site/guardaserie/__init__.py +52 -0
  37. StreamingCommunity/Src/Api/Site/guardaserie/costant.py +15 -0
  38. StreamingCommunity/Src/Api/Site/guardaserie/series.py +195 -0
  39. StreamingCommunity/Src/Api/Site/guardaserie/site.py +84 -0
  40. StreamingCommunity/Src/Api/Site/guardaserie/util/ScrapeSerie.py +110 -0
  41. StreamingCommunity/Src/Api/Site/mostraguarda/__init__.py +48 -0
  42. StreamingCommunity/Src/Api/Site/mostraguarda/costant.py +15 -0
  43. StreamingCommunity/Src/Api/Site/mostraguarda/film.py +94 -0
  44. StreamingCommunity/Src/Api/Site/piratebays/__init__.py +50 -0
  45. StreamingCommunity/Src/Api/Site/piratebays/costant.py +15 -0
  46. StreamingCommunity/Src/Api/Site/piratebays/site.py +89 -0
  47. StreamingCommunity/Src/Api/Site/piratebays/title.py +45 -0
  48. StreamingCommunity/Src/Api/Site/streamingcommunity/__init__.py +55 -0
  49. StreamingCommunity/Src/Api/Site/streamingcommunity/costant.py +15 -0
  50. StreamingCommunity/Src/Api/Site/streamingcommunity/film.py +70 -0
  51. StreamingCommunity/Src/Api/Site/streamingcommunity/series.py +203 -0
  52. StreamingCommunity/Src/Api/Site/streamingcommunity/site.py +126 -0
  53. StreamingCommunity/Src/Api/Site/streamingcommunity/util/ScrapeSerie.py +113 -0
  54. StreamingCommunity/Src/Api/Template/Class/SearchType.py +101 -0
  55. StreamingCommunity/Src/Api/Template/Util/__init__.py +5 -0
  56. StreamingCommunity/Src/Api/Template/Util/get_domain.py +137 -0
  57. StreamingCommunity/Src/Api/Template/Util/manage_ep.py +153 -0
  58. StreamingCommunity/Src/Api/Template/Util/recall_search.py +37 -0
  59. StreamingCommunity/Src/Api/Template/__init__.py +3 -0
  60. StreamingCommunity/Src/Api/Template/site.py +87 -0
  61. StreamingCommunity/Src/Lib/Downloader/HLS/downloader.py +968 -0
  62. StreamingCommunity/Src/Lib/Downloader/HLS/proxyes.py +110 -0
  63. StreamingCommunity/Src/Lib/Downloader/HLS/segments.py +540 -0
  64. StreamingCommunity/Src/Lib/Downloader/MP4/downloader.py +156 -0
  65. StreamingCommunity/Src/Lib/Downloader/TOR/downloader.py +222 -0
  66. StreamingCommunity/Src/Lib/Downloader/__init__.py +5 -0
  67. StreamingCommunity/Src/Lib/Driver/driver_1.py +76 -0
  68. StreamingCommunity/Src/Lib/FFmpeg/__init__.py +4 -0
  69. StreamingCommunity/Src/Lib/FFmpeg/capture.py +170 -0
  70. StreamingCommunity/Src/Lib/FFmpeg/command.py +292 -0
  71. StreamingCommunity/Src/Lib/FFmpeg/util.py +242 -0
  72. StreamingCommunity/Src/Lib/M3U8/__init__.py +6 -0
  73. StreamingCommunity/Src/Lib/M3U8/decryptor.py +129 -0
  74. StreamingCommunity/Src/Lib/M3U8/estimator.py +173 -0
  75. StreamingCommunity/Src/Lib/M3U8/parser.py +666 -0
  76. StreamingCommunity/Src/Lib/M3U8/url_fixer.py +52 -0
  77. StreamingCommunity/Src/Lib/TMBD/__init__.py +2 -0
  78. StreamingCommunity/Src/Lib/TMBD/obj_tmbd.py +39 -0
  79. StreamingCommunity/Src/Lib/TMBD/tmdb.py +346 -0
  80. StreamingCommunity/Src/Upload/update.py +64 -0
  81. StreamingCommunity/Src/Upload/version.py +5 -0
  82. StreamingCommunity/Src/Util/_jsonConfig.py +204 -0
  83. StreamingCommunity/Src/Util/call_stack.py +42 -0
  84. StreamingCommunity/Src/Util/color.py +20 -0
  85. StreamingCommunity/Src/Util/console.py +12 -0
  86. StreamingCommunity/Src/Util/headers.py +147 -0
  87. StreamingCommunity/Src/Util/logger.py +53 -0
  88. StreamingCommunity/Src/Util/message.py +46 -0
  89. StreamingCommunity/Src/Util/os.py +417 -0
  90. StreamingCommunity/Src/Util/table.py +163 -0
  91. StreamingCommunity/run.py +196 -0
  92. StreamingCommunity-1.7.6.dist-info/LICENSE +674 -0
  93. StreamingCommunity-1.7.6.dist-info/METADATA +348 -0
  94. StreamingCommunity-1.7.6.dist-info/RECORD +97 -0
  95. StreamingCommunity-1.7.6.dist-info/WHEEL +5 -0
  96. StreamingCommunity-1.7.6.dist-info/entry_points.txt +2 -0
  97. StreamingCommunity-1.7.6.dist-info/top_level.txt +1 -0
@@ -0,0 +1,196 @@
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.Src.Util.message import start_message
16
+ from StreamingCommunity.Src.Util.console import console, msg
17
+ from StreamingCommunity.Src.Util._jsonConfig import config_manager
18
+ from StreamingCommunity.Src.Upload.update import update as git_update
19
+ from StreamingCommunity.Src.Util.os import os_summary
20
+ from StreamingCommunity.Src.Lib.TMBD import tmdb
21
+ from StreamingCommunity.Src.Util.logger import Logger
22
+
23
+
24
+ # Config
25
+ CLOSE_CONSOLE = config_manager.get_bool('DEFAULT', 'not_close')
26
+ SHOW_TRENDING = config_manager.get_bool('DEFAULT', 'show_trending')
27
+
28
+
29
+ def run_function(func: Callable[..., None], close_console: bool = False) -> None:
30
+ """
31
+ Run a given function indefinitely or once, depending on the value of close_console.
32
+
33
+ Parameters:
34
+ func (Callable[..., None]): The function to run.
35
+ close_console (bool, optional): Whether to close the console after running the function once. Defaults to False.
36
+ """
37
+ if close_console:
38
+ while 1:
39
+ func()
40
+ else:
41
+ func()
42
+
43
+
44
+ def load_search_functions():
45
+ modules = []
46
+ loaded_functions = {}
47
+
48
+ # Traverse the Api directory
49
+ api_dir = os.path.join(os.path.dirname(__file__), 'Src', 'Api', 'Site')
50
+ init_files = glob.glob(os.path.join(api_dir, '*', '__init__.py'))
51
+
52
+ # Retrieve modules and their indices
53
+ for init_file in init_files:
54
+
55
+ # Get folder name as module name
56
+ module_name = os.path.basename(os.path.dirname(init_file))
57
+ logging.info(f"Load module name: {module_name}")
58
+
59
+ try:
60
+ # Dynamically import the module
61
+ mod = importlib.import_module(f'StreamingCommunity.Src.Api.Site.{module_name}')
62
+
63
+ # Get 'indice' from the module
64
+ indice = getattr(mod, 'indice', 0)
65
+ is_deprecate = bool(getattr(mod, '_deprecate', True))
66
+ use_for = getattr(mod, '_useFor', 'other')
67
+
68
+ if not is_deprecate:
69
+ modules.append((module_name, indice, use_for))
70
+
71
+ except Exception as e:
72
+ console.print(f"[red]Failed to import module {module_name}: {str(e)}")
73
+
74
+ # Sort modules by 'indice'
75
+ modules.sort(key=lambda x: x[1])
76
+
77
+ # Load search functions in the sorted order
78
+ for module_name, _, use_for in modules:
79
+
80
+ # Construct a unique alias for the module
81
+ module_alias = f'{module_name}_search'
82
+
83
+ try:
84
+
85
+ # Dynamically import the module
86
+ mod = importlib.import_module(f'StreamingCommunity.Src.Api.Site.{module_name}')
87
+
88
+ # Get the search function from the module (assuming the function is named 'search' and defined in __init__.py)
89
+ search_function = getattr(mod, 'search')
90
+
91
+ # Add the function to the loaded functions dictionary
92
+ loaded_functions[module_alias] = (search_function, use_for)
93
+
94
+ except Exception as e:
95
+ console.print(f"[red]Failed to load search function from module {module_name}: {str(e)}")
96
+
97
+ return loaded_functions
98
+
99
+
100
+ def initialize():
101
+
102
+ # Get start message
103
+ start_message()
104
+
105
+ # Get system info
106
+ os_summary.get_system_summary()
107
+
108
+ # Set terminal size for win 7
109
+ if platform.system() == "Windows" and "7" in platform.version():
110
+ os.system('mode 120, 40')
111
+
112
+ # Check python version
113
+ if sys.version_info < (3, 7):
114
+ console.log("[red]Install python version > 3.7.16")
115
+ sys.exit(0)
116
+
117
+ # Attempting GitHub update
118
+ try:
119
+ git_update()
120
+ print()
121
+ except:
122
+ console.log("[red]Error with loading github.")
123
+
124
+ # Show trending film and series
125
+ if SHOW_TRENDING:
126
+ tmdb.display_trending_films()
127
+ print()
128
+ tmdb.display_trending_tv_shows()
129
+ print()
130
+
131
+
132
+ def main():
133
+
134
+ start = time.time()
135
+
136
+ # Create logger
137
+ log_not = Logger()
138
+ initialize()
139
+
140
+ # Load search functions
141
+ search_functions = load_search_functions()
142
+ logging.info(f"Load module in: {time.time() - start} s")
143
+
144
+ # Create dynamic argument parser
145
+ parser = argparse.ArgumentParser(description='Script to download film and series from the internet.')
146
+
147
+ color_map = {
148
+ "anime": "red",
149
+ "film_serie": "yellow",
150
+ "film": "blue",
151
+ "serie": "green",
152
+ "other": "white"
153
+ }
154
+
155
+ # Add dynamic arguments based on loaded search modules
156
+ for alias, (_, use_for) in search_functions.items():
157
+ short_option = alias[:3].upper()
158
+ long_option = alias
159
+ parser.add_argument(f'-{short_option}', f'--{long_option}', action='store_true', help=f'Search for {alias.split("_")[0]} on streaming platforms.')
160
+
161
+ # Parse command line arguments
162
+ args = parser.parse_args()
163
+
164
+ # Mapping command-line arguments to functions
165
+ arg_to_function = {alias: func for alias, (func, _) in search_functions.items()}
166
+
167
+ # Check which argument is provided and run the corresponding function
168
+ for arg, func in arg_to_function.items():
169
+ if getattr(args, arg):
170
+ run_function(func)
171
+ return
172
+
173
+ # Mapping user input to functions
174
+ input_to_function = {str(i): func for i, (alias, (func, _)) in enumerate(search_functions.items())}
175
+
176
+ # Create dynamic prompt message and choices
177
+ choice_labels = {str(i): (alias.split("_")[0].capitalize(), use_for) for i, (alias, (_, use_for)) in enumerate(search_functions.items())}
178
+
179
+ # Display the category legend in a single line
180
+ legend_text = " | ".join([f"[{color}]{category.capitalize()}[/{color}]" for category, color in color_map.items()])
181
+ console.print(f"[bold green]Category Legend:[/bold green] {legend_text}")
182
+
183
+ # Construct the prompt message with color-coded site names
184
+ prompt_message = "[green]Insert category [white](" + ", ".join(
185
+ [f"{key}: [{color_map[label[1]]}]{label[0]}[/{color_map[label[1]]}]" for key, label in choice_labels.items()]
186
+ ) + "[white])"
187
+
188
+ # Ask the user for input
189
+ category = msg.ask(prompt_message, choices=list(choice_labels.keys()), default="0", show_choices=False, show_default=False)
190
+
191
+ # Run the corresponding function based on user input
192
+ if category in input_to_function:
193
+ run_function(input_to_function[category])
194
+ else:
195
+ console.print("[red]Invalid category.")
196
+ sys.exit(0)