StreamingCommunity 1.9.8__py3-none-any.whl → 1.9.90__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 (93) hide show
  1. StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +143 -0
  2. StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +145 -0
  3. StreamingCommunity/Api/Player/ddl.py +89 -0
  4. StreamingCommunity/Api/Player/maxstream.py +151 -0
  5. StreamingCommunity/Api/Player/supervideo.py +194 -0
  6. StreamingCommunity/Api/Player/vixcloud.py +273 -0
  7. StreamingCommunity/Api/Site/1337xx/__init__.py +51 -0
  8. StreamingCommunity/Api/Site/1337xx/costant.py +15 -0
  9. StreamingCommunity/Api/Site/1337xx/site.py +86 -0
  10. StreamingCommunity/Api/Site/1337xx/title.py +66 -0
  11. StreamingCommunity/Api/Site/altadefinizione/__init__.py +51 -0
  12. StreamingCommunity/Api/Site/altadefinizione/costant.py +15 -0
  13. StreamingCommunity/Api/Site/altadefinizione/film.py +74 -0
  14. StreamingCommunity/Api/Site/altadefinizione/site.py +89 -0
  15. StreamingCommunity/Api/Site/animeunity/__init__.py +51 -0
  16. StreamingCommunity/Api/Site/animeunity/costant.py +15 -0
  17. StreamingCommunity/Api/Site/animeunity/film_serie.py +135 -0
  18. StreamingCommunity/Api/Site/animeunity/site.py +167 -0
  19. StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +97 -0
  20. StreamingCommunity/Api/Site/cb01new/__init__.py +52 -0
  21. StreamingCommunity/Api/Site/cb01new/costant.py +15 -0
  22. StreamingCommunity/Api/Site/cb01new/film.py +73 -0
  23. StreamingCommunity/Api/Site/cb01new/site.py +76 -0
  24. StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +58 -0
  25. StreamingCommunity/Api/Site/ddlstreamitaly/costant.py +16 -0
  26. StreamingCommunity/Api/Site/ddlstreamitaly/series.py +146 -0
  27. StreamingCommunity/Api/Site/ddlstreamitaly/site.py +95 -0
  28. StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +85 -0
  29. StreamingCommunity/Api/Site/guardaserie/__init__.py +53 -0
  30. StreamingCommunity/Api/Site/guardaserie/costant.py +15 -0
  31. StreamingCommunity/Api/Site/guardaserie/series.py +199 -0
  32. StreamingCommunity/Api/Site/guardaserie/site.py +86 -0
  33. StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +110 -0
  34. StreamingCommunity/Api/Site/ilcorsaronero/__init__.py +52 -0
  35. StreamingCommunity/Api/Site/ilcorsaronero/costant.py +15 -0
  36. StreamingCommunity/Api/Site/ilcorsaronero/site.py +63 -0
  37. StreamingCommunity/Api/Site/ilcorsaronero/title.py +46 -0
  38. StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +141 -0
  39. StreamingCommunity/Api/Site/mostraguarda/__init__.py +49 -0
  40. StreamingCommunity/Api/Site/mostraguarda/costant.py +15 -0
  41. StreamingCommunity/Api/Site/mostraguarda/film.py +99 -0
  42. StreamingCommunity/Api/Site/streamingcommunity/__init__.py +56 -0
  43. StreamingCommunity/Api/Site/streamingcommunity/costant.py +15 -0
  44. StreamingCommunity/Api/Site/streamingcommunity/film.py +75 -0
  45. StreamingCommunity/Api/Site/streamingcommunity/series.py +206 -0
  46. StreamingCommunity/Api/Site/streamingcommunity/site.py +137 -0
  47. StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +123 -0
  48. StreamingCommunity/Api/Template/Class/SearchType.py +101 -0
  49. StreamingCommunity/Api/Template/Util/__init__.py +5 -0
  50. StreamingCommunity/Api/Template/Util/get_domain.py +173 -0
  51. StreamingCommunity/Api/Template/Util/manage_ep.py +179 -0
  52. StreamingCommunity/Api/Template/Util/recall_search.py +37 -0
  53. StreamingCommunity/Api/Template/__init__.py +3 -0
  54. StreamingCommunity/Api/Template/site.py +87 -0
  55. StreamingCommunity/Lib/Downloader/HLS/downloader.py +946 -0
  56. StreamingCommunity/Lib/Downloader/HLS/proxyes.py +110 -0
  57. StreamingCommunity/Lib/Downloader/HLS/segments.py +561 -0
  58. StreamingCommunity/Lib/Downloader/MP4/downloader.py +155 -0
  59. StreamingCommunity/Lib/Downloader/TOR/downloader.py +296 -0
  60. StreamingCommunity/Lib/Downloader/__init__.py +5 -0
  61. StreamingCommunity/Lib/FFmpeg/__init__.py +4 -0
  62. StreamingCommunity/Lib/FFmpeg/capture.py +170 -0
  63. StreamingCommunity/Lib/FFmpeg/command.py +296 -0
  64. StreamingCommunity/Lib/FFmpeg/util.py +249 -0
  65. StreamingCommunity/Lib/M3U8/__init__.py +6 -0
  66. StreamingCommunity/Lib/M3U8/decryptor.py +164 -0
  67. StreamingCommunity/Lib/M3U8/estimator.py +176 -0
  68. StreamingCommunity/Lib/M3U8/parser.py +666 -0
  69. StreamingCommunity/Lib/M3U8/url_fixer.py +52 -0
  70. StreamingCommunity/Lib/TMBD/__init__.py +2 -0
  71. StreamingCommunity/Lib/TMBD/obj_tmbd.py +39 -0
  72. StreamingCommunity/Lib/TMBD/tmdb.py +346 -0
  73. StreamingCommunity/Upload/update.py +68 -0
  74. StreamingCommunity/Upload/version.py +5 -0
  75. StreamingCommunity/Util/_jsonConfig.py +204 -0
  76. StreamingCommunity/Util/call_stack.py +42 -0
  77. StreamingCommunity/Util/color.py +20 -0
  78. StreamingCommunity/Util/console.py +12 -0
  79. StreamingCommunity/Util/ffmpeg_installer.py +311 -0
  80. StreamingCommunity/Util/headers.py +147 -0
  81. StreamingCommunity/Util/logger.py +53 -0
  82. StreamingCommunity/Util/message.py +64 -0
  83. StreamingCommunity/Util/os.py +554 -0
  84. StreamingCommunity/Util/table.py +229 -0
  85. StreamingCommunity/__init__.py +0 -0
  86. StreamingCommunity/run.py +2 -2
  87. {StreamingCommunity-1.9.8.dist-info → StreamingCommunity-1.9.90.dist-info}/METADATA +7 -10
  88. StreamingCommunity-1.9.90.dist-info/RECORD +92 -0
  89. {StreamingCommunity-1.9.8.dist-info → StreamingCommunity-1.9.90.dist-info}/WHEEL +1 -1
  90. {StreamingCommunity-1.9.8.dist-info → StreamingCommunity-1.9.90.dist-info}/entry_points.txt +0 -1
  91. StreamingCommunity-1.9.8.dist-info/RECORD +0 -7
  92. {StreamingCommunity-1.9.8.dist-info → StreamingCommunity-1.9.90.dist-info}/LICENSE +0 -0
  93. {StreamingCommunity-1.9.8.dist-info → StreamingCommunity-1.9.90.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,147 @@
1
+ # 4.04.24
2
+
3
+ import re
4
+ import random
5
+
6
+
7
+ # External library
8
+ from fake_useragent import UserAgent
9
+
10
+
11
+ # Variable
12
+ ua = UserAgent(use_external_data=True)
13
+
14
+
15
+ def extract_versions(user_agent):
16
+ """
17
+ Extract browser versions from the user agent.
18
+
19
+ Parameters:
20
+ user_agent (str): User agent of the browser.
21
+
22
+ Returns:
23
+ list: List of browser versions.
24
+ """
25
+
26
+ # Patterns to extract versions from various user agents
27
+ patterns = {
28
+ 'chrome': re.compile(r'Chrome/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
29
+ 'firefox': re.compile(r'Firefox/(\d+)\.?(\d+)?\.?(\d+)?'),
30
+ 'safari': re.compile(r'Version/(\d+)\.(\d+)\.(\d+) Safari/(\d+)\.(\d+)\.(\d+)'),
31
+ 'edge': re.compile(r'Edg/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
32
+ 'edgios': re.compile(r'EdgiOS/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
33
+ 'crios': re.compile(r'CriOS/(\d+)\.(\d+)\.(\d+)\.(\d+)'),
34
+ }
35
+
36
+ for key, pattern in patterns.items():
37
+ match = pattern.search(user_agent)
38
+ if match:
39
+ return [match.group(i+1) for i in range(match.lastindex)]
40
+
41
+ # Fallback values if specific versions are not found
42
+ return ['99', '0', '0', '0']
43
+
44
+ def get_platform(user_agent):
45
+ """
46
+ Determine the device platform from the user agent.
47
+
48
+ Parameters:
49
+ user_agent (str): User agent of the browser.
50
+
51
+ Returns:
52
+ str: Device platform.
53
+ """
54
+ if 'Windows' in user_agent:
55
+ return '"Windows"'
56
+ elif 'Mac OS X' in user_agent:
57
+ return '"macOS"'
58
+ elif 'Android' in user_agent:
59
+ return '"Android"'
60
+ elif 'iPhone' in user_agent or 'iPad' in user_agent:
61
+ return '"iOS"'
62
+ elif 'Linux' in user_agent:
63
+ return '"Linux"'
64
+ return '"Unknown"'
65
+
66
+ def get_model(user_agent):
67
+ """
68
+ Determine the device model from the user agent.
69
+
70
+ Parameters:
71
+ user_agent (str): User agent of the browser.
72
+
73
+ Returns:
74
+ str: Device model.
75
+ """
76
+ if 'iPhone' in user_agent:
77
+ return '"iPhone"'
78
+ elif 'iPad' in user_agent:
79
+ return '"iPad"'
80
+ elif 'Android' in user_agent:
81
+ return '"Android"'
82
+ elif 'Windows' in user_agent:
83
+ return '"PC"'
84
+ elif 'Mac OS X' in user_agent:
85
+ return '"Mac"'
86
+ elif 'Linux' in user_agent:
87
+ return '"Linux"'
88
+ return '"Unknown"'
89
+
90
+ def random_headers(referer: str = None):
91
+ """
92
+ Generate random HTTP headers to simulate human-like behavior.
93
+
94
+ Returns:
95
+ dict: Generated HTTP headers.
96
+ """
97
+ user_agent = ua.random
98
+ versions = extract_versions(user_agent)
99
+ platform = get_platform(user_agent)
100
+ model = get_model(user_agent)
101
+ is_mobile = 'Mobi' in user_agent or 'Android' in user_agent
102
+
103
+ # Generate sec-ch-ua string based on the browser
104
+ if 'Chrome' in user_agent or 'CriOS' in user_agent:
105
+ sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Chromium";v="{versions[0]}", "Google Chrome";v="{versions[0]}"'
106
+ elif 'Edg' in user_agent or 'EdgiOS' in user_agent:
107
+ sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Chromium";v="{versions[0]}", "Microsoft Edge";v="{versions[0]}"'
108
+ elif 'Firefox' in user_agent:
109
+ sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Firefox";v="{versions[0]}"'
110
+ elif 'Safari' in user_agent:
111
+ sec_ch_ua = f'" Not;A Brand";v="{versions[0]}", "Safari";v="{versions[0]}"'
112
+ else:
113
+ sec_ch_ua = f'" Not;A Brand";v="{versions[0]}"'
114
+
115
+ headers = {
116
+ 'User-Agent': user_agent,
117
+ 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
118
+ 'Accept-Language': random.choice(['en-US', 'en-GB', 'fr-FR', 'es-ES', 'de-DE']),
119
+ 'Accept-Encoding': 'gzip, deflate, br',
120
+ 'Connection': 'keep-alive',
121
+ 'Upgrade-Insecure-Requests': '1',
122
+ 'Sec-Fetch-Dest': 'document',
123
+ 'Sec-Fetch-Mode': 'navigate',
124
+ 'Sec-Fetch-Site': 'none',
125
+ 'Sec-Fetch-User': '?1',
126
+ 'sec-ch-ua-mobile': '?1' if is_mobile else '?0',
127
+ 'sec-ch-ua-platform': platform,
128
+ 'sec-ch-ua': sec_ch_ua,
129
+ 'sec-ch-ua-model': model
130
+ }
131
+
132
+ if referer:
133
+ headers['Origin'] = referer
134
+ headers['Referer'] = referer
135
+
136
+ return headers
137
+
138
+ def get_headers() -> str:
139
+ """
140
+ Generate a random user agent to use in HTTP requests.
141
+
142
+ Returns:
143
+ - str: A random user agent string.
144
+ """
145
+
146
+ # Get a random user agent string from the user agent rotator
147
+ return str(ua.chrome)
@@ -0,0 +1,53 @@
1
+ # 26.03.24
2
+
3
+ import logging
4
+ from logging.handlers import RotatingFileHandler
5
+
6
+
7
+ # Internal utilities
8
+ from StreamingCommunity.Util._jsonConfig import config_manager
9
+
10
+
11
+ class Logger:
12
+ def __init__(self):
13
+
14
+ # Fetching configuration values
15
+ self.DEBUG_MODE = config_manager.get_bool("DEFAULT", "debug")
16
+ self.log_to_file = config_manager.get_bool("DEFAULT", "log_to_file")
17
+ self.log_file = config_manager.get("DEFAULT", "log_file") if self.log_to_file else None
18
+
19
+ logging.getLogger("httpx").setLevel(logging.WARNING)
20
+ logging.getLogger("httpcore").setLevel(logging.WARNING)
21
+
22
+
23
+ # Setting logging level based on DEBUG_MODE
24
+ if self.DEBUG_MODE:
25
+ logging.getLogger('root').setLevel(logging.DEBUG)
26
+
27
+ # Configure file logging if debug mode and logging to file are both enabled
28
+ if self.log_to_file:
29
+ self.configure_file_logging()
30
+ else:
31
+
32
+ # If DEBUG_MODE is False, set logging level to ERROR
33
+ logging.getLogger('root').setLevel(logging.ERROR)
34
+
35
+ # Configure console logging
36
+ self.configure_logging()
37
+
38
+ def configure_logging(self):
39
+ """
40
+ Configure console logging.
41
+ """
42
+ logging.basicConfig(level=logging.DEBUG, format='[%(filename)s:%(lineno)s - %(funcName)20s() ] %(asctime)s - %(levelname)s - %(message)s')
43
+
44
+ def configure_file_logging(self):
45
+ """
46
+ Configure file logging if enabled.
47
+ """
48
+
49
+ file_handler = RotatingFileHandler(self.log_file, maxBytes=10*1024*1024, backupCount=5)
50
+ file_handler.setLevel(logging.DEBUG)
51
+ formatter = logging.Formatter('[%(filename)s:%(lineno)s - %(funcName)20s() ] %(asctime)s - %(levelname)s - %(message)s')
52
+ file_handler.setFormatter(formatter)
53
+ logging.getLogger('').addHandler(file_handler)
@@ -0,0 +1,64 @@
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
+ # Variable
11
+ CLEAN = config_manager.get_bool('DEFAULT', 'clean_console')
12
+ SHOW = config_manager.get_bool('DEFAULT', 'show_message')
13
+
14
+
15
+ def create_italian_flag_colored_text(text: str) -> str:
16
+ """Create text divided into three sections with Italian flag colors, splitting each line at two spaces."""
17
+
18
+ # Split the text into lines
19
+ lines = text.splitlines()
20
+
21
+ colored_lines = []
22
+
23
+ for line in lines:
24
+ # Split each line into parts using two spaces as a delimiter
25
+ parts = line.split(" ")
26
+
27
+ # Ensure there are exactly 3 parts (add empty strings if necessary)
28
+ parts += [''] * (4 - len(parts))
29
+
30
+ # Apply flag colors to the parts
31
+ green_part = f"[green]{parts[0]}[/]"
32
+ white_part = f"[white]{parts[1]}[/]"
33
+ red_part = f"[red]{parts[2]}[/]"
34
+
35
+ # Reassemble the colored line
36
+ colored_line = green_part + white_part + red_part
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")