StreamingCommunity 3.3.9__tar.gz → 3.4.2__tar.gz

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 (120) hide show
  1. {streamingcommunity-3.3.9/StreamingCommunity.egg-info → streamingcommunity-3.4.2}/PKG-INFO +1 -3
  2. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/README.md +0 -2
  3. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Player/hdplayer.py +0 -5
  4. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Player/mediapolisvod.py +4 -13
  5. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Player/supervideo.py +3 -8
  6. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Player/sweetpixel.py +1 -9
  7. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Player/vixcloud.py +5 -16
  8. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/altadefinizione/film.py +4 -16
  9. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/altadefinizione/series.py +3 -12
  10. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/altadefinizione/site.py +2 -9
  11. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py +2 -7
  12. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeunity/site.py +9 -24
  13. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +11 -27
  14. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeworld/film.py +4 -2
  15. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeworld/site.py +3 -11
  16. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py +1 -4
  17. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/crunchyroll/film.py +4 -5
  18. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/crunchyroll/series.py +5 -17
  19. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/crunchyroll/site.py +4 -13
  20. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/crunchyroll/util/ScrapeSerie.py +5 -27
  21. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/crunchyroll/util/get_license.py +11 -26
  22. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/guardaserie/series.py +3 -14
  23. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/guardaserie/site.py +4 -12
  24. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +3 -10
  25. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/mediasetinfinity/film.py +11 -12
  26. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/mediasetinfinity/series.py +4 -15
  27. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/mediasetinfinity/site.py +16 -32
  28. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/mediasetinfinity/util/ScrapeSerie.py +39 -50
  29. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/mediasetinfinity/util/fix_mpd.py +3 -3
  30. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/mediasetinfinity/util/get_license.py +7 -25
  31. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/raiplay/film.py +6 -8
  32. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/raiplay/series.py +5 -20
  33. streamingcommunity-3.4.2/StreamingCommunity/Api/Site/raiplay/site.py +101 -0
  34. streamingcommunity-3.4.2/StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +194 -0
  35. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/raiplay/util/get_license.py +3 -12
  36. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingcommunity/film.py +5 -16
  37. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingcommunity/series.py +5 -10
  38. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingcommunity/site.py +3 -22
  39. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +11 -27
  40. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingwatch/__init__.py +1 -0
  41. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingwatch/film.py +4 -2
  42. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingwatch/series.py +4 -14
  43. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingwatch/site.py +4 -18
  44. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingwatch/util/ScrapeSerie.py +0 -3
  45. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Template/Util/__init__.py +4 -2
  46. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Template/Util/manage_ep.py +66 -0
  47. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Template/config_loader.py +0 -7
  48. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/DASH/decrypt.py +54 -1
  49. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/DASH/downloader.py +186 -70
  50. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/DASH/parser.py +2 -3
  51. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/DASH/segments.py +109 -68
  52. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +100 -82
  53. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/HLS/segments.py +40 -28
  54. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +16 -4
  55. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/FFmpeg/capture.py +37 -5
  56. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/FFmpeg/command.py +32 -90
  57. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/M3U8/estimator.py +47 -1
  58. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/TMBD/tmdb.py +2 -4
  59. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/TelegramHelp/config.json +0 -1
  60. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Upload/update.py +19 -6
  61. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Upload/version.py +1 -1
  62. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/config_json.py +28 -21
  63. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/http_client.py +28 -0
  64. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/os.py +16 -6
  65. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/table.py +50 -8
  66. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2/StreamingCommunity.egg-info}/PKG-INFO +1 -3
  67. streamingcommunity-3.3.9/StreamingCommunity/Api/Site/raiplay/site.py +0 -103
  68. streamingcommunity-3.3.9/StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +0 -158
  69. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/LICENSE +0 -0
  70. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/MANIFEST.in +0 -0
  71. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
  72. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +0 -0
  73. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/altadefinizione/__init__.py +0 -0
  74. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeunity/__init__.py +0 -0
  75. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeunity/film.py +0 -0
  76. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeunity/serie.py +0 -0
  77. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeworld/__init__.py +0 -0
  78. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/animeworld/serie.py +0 -0
  79. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/crunchyroll/__init__.py +0 -0
  80. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/guardaserie/__init__.py +0 -0
  81. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/mediasetinfinity/__init__.py +0 -0
  82. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/raiplay/__init__.py +0 -0
  83. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +0 -0
  84. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
  85. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Template/__init__.py +0 -0
  86. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Template/loader.py +0 -0
  87. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Api/Template/site.py +0 -0
  88. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/DASH/cdm_helpher.py +0 -0
  89. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/TOR/downloader.py +0 -0
  90. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/Downloader/__init__.py +0 -0
  91. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -0
  92. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/FFmpeg/util.py +0 -0
  93. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/M3U8/__init__.py +0 -0
  94. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/M3U8/decryptor.py +0 -0
  95. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/M3U8/parser.py +0 -0
  96. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/M3U8/url_fixer.py +0 -0
  97. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/TMBD/__init__.py +0 -0
  98. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
  99. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
  100. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/TelegramHelp/telegram_bot.py +0 -0
  101. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/color.py +0 -0
  102. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/headers.py +0 -0
  103. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/installer/__init__.py +0 -0
  104. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/installer/bento4_install.py +0 -0
  105. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/installer/binary_paths.py +0 -0
  106. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/installer/device_install.py +0 -0
  107. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/installer/ffmpeg_install.py +0 -0
  108. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/logger.py +0 -0
  109. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/Util/message.py +0 -0
  110. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/__init__.py +0 -0
  111. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/global_search.py +0 -0
  112. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity/run.py +0 -0
  113. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity.egg-info/SOURCES.txt +0 -0
  114. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
  115. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity.egg-info/entry_points.txt +0 -0
  116. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity.egg-info/requires.txt +0 -0
  117. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/StreamingCommunity.egg-info/top_level.txt +0 -0
  118. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/requirements.txt +0 -0
  119. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/setup.cfg +0 -0
  120. {streamingcommunity-3.3.9 → streamingcommunity-3.4.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: StreamingCommunity
3
- Version: 3.3.9
3
+ Version: 3.4.2
4
4
  Home-page: https://github.com/Arrowar/StreamingCommunity
5
5
  Author: Arrowar
6
6
  Project-URL: Bug Reports, https://github.com/Arrowar/StreamingCommunity/issues
@@ -182,7 +182,6 @@ mpd_url = "https://example.com/stream.mpd"
182
182
  license_url = "https://example.com/get_license"
183
183
 
184
184
  dash_process = DASH_Downloader(
185
- cdm_device=get_wvd_path(),
186
185
  license_url=license_url,
187
186
  mpd_url=mpd_url,
188
187
  output_path="output.mp4",
@@ -267,7 +266,6 @@ To enable qBittorrent integration, follow the setup guide [here](https://github.
267
266
  "specific_list_audio": [
268
267
  "ita"
269
268
  ],
270
- "download_subtitle": true,
271
269
  "merge_subs": true,
272
270
  "specific_list_subtitles": [
273
271
  "ita", // Specify language codes or use ["*"] to download all available subtitles
@@ -146,7 +146,6 @@ mpd_url = "https://example.com/stream.mpd"
146
146
  license_url = "https://example.com/get_license"
147
147
 
148
148
  dash_process = DASH_Downloader(
149
- cdm_device=get_wvd_path(),
150
149
  license_url=license_url,
151
150
  mpd_url=mpd_url,
152
151
  output_path="output.mp4",
@@ -231,7 +230,6 @@ To enable qBittorrent integration, follow the setup guide [here](https://github.
231
230
  "specific_list_audio": [
232
231
  "ita"
233
232
  ],
234
- "download_subtitle": true,
235
233
  "merge_subs": true,
236
234
  "specific_list_subtitles": [
237
235
  "ita", // Specify language codes or use ["*"] to download all available subtitles
@@ -9,13 +9,8 @@ from bs4 import BeautifulSoup
9
9
  # Internal utilities
10
10
  from StreamingCommunity.Util.headers import get_userAgent
11
11
  from StreamingCommunity.Util.http_client import create_client
12
- from StreamingCommunity.Util.config_json import config_manager
13
12
 
14
13
 
15
- # Variable
16
- MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
17
- REQUEST_VERIFY = config_manager.get_bool('REQUESTS', 'verify')
18
-
19
14
 
20
15
  class VideoSource:
21
16
  def __init__(self):
@@ -1,21 +1,12 @@
1
1
  # 11.04.25
2
2
 
3
3
 
4
- # External libraries
5
- import httpx
6
-
7
-
8
4
  # Internal utilities
9
- from StreamingCommunity.Util.config_json import config_manager
5
+ from StreamingCommunity.Util.http_client import create_client
10
6
  from StreamingCommunity.Util.headers import get_headers
11
7
 
12
8
 
13
- # Variable
14
- MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
15
- REQUEST_VERIFY = config_manager.get_bool('REQUESTS', 'verify')
16
-
17
9
  class VideoSource:
18
-
19
10
  @staticmethod
20
11
  def extract_m3u8_url(video_url: str) -> str:
21
12
  """Extract the m3u8 streaming URL from a RaiPlay video URL."""
@@ -29,7 +20,7 @@ class VideoSource:
29
20
  return "Error: Unable to determine video JSON URL"
30
21
 
31
22
  try:
32
- response = httpx.get(video_url, headers=get_headers(), timeout=MAX_TIMEOUT, verify=REQUEST_VERIFY)
23
+ response = create_client(headers=get_headers()).get(video_url)
33
24
  if response.status_code != 200:
34
25
  return f"Error: Failed to fetch video data (Status: {response.status_code})"
35
26
 
@@ -50,8 +41,8 @@ class VideoSource:
50
41
  'cont': element_key,
51
42
  'output': '62',
52
43
  }
53
- stream_response = httpx.get('https://mediapolisvod.rai.it/relinker/relinkerServlet.htm', params=params, headers=get_headers(), timeout=MAX_TIMEOUT, verify=REQUEST_VERIFY)
54
-
44
+
45
+ stream_response = create_client(headers=get_headers()).get('https://mediapolisvod.rai.it/relinker/relinkerServlet.htm', params=params)
55
46
  if stream_response.status_code != 200:
56
47
  return f"Error: Failed to fetch stream URL (Status: {stream_response.status_code})"
57
48
 
@@ -7,19 +7,13 @@ import logging
7
7
  # External libraries
8
8
  import jsbeautifier
9
9
  from bs4 import BeautifulSoup
10
- from curl_cffi import requests
11
10
 
12
11
 
13
12
  # Internal utilities
14
- from StreamingCommunity.Util.config_json import config_manager
13
+ from StreamingCommunity.Util.http_client import create_client_curl
15
14
  from StreamingCommunity.Util.headers import get_headers
16
15
 
17
16
 
18
- # Variable
19
- MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
20
- REQUEST_VERIFY = config_manager.get_bool('REQUESTS', 'verify')
21
-
22
-
23
17
  class VideoSource:
24
18
  def __init__(self, url: str) -> None:
25
19
  """
@@ -42,10 +36,11 @@ class VideoSource:
42
36
  - str: The response content if successful, None otherwise.
43
37
  """
44
38
  try:
45
- response = requests.get(url, headers=self.headers, timeout=MAX_TIMEOUT, impersonate="chrome136", verify=REQUEST_VERIFY)
39
+ response = create_client_curl(headers=self.headers).get(url)
46
40
  if response.status_code >= 400:
47
41
  logging.error(f"Request failed with status code: {response.status_code}")
48
42
  return None
43
+
49
44
  return response.text
50
45
 
51
46
  except Exception as e:
@@ -3,19 +3,11 @@
3
3
  import logging
4
4
 
5
5
 
6
- # External libraries
7
-
8
-
9
6
  # Internal utilities
10
- from StreamingCommunity.Util.config_json import config_manager
11
7
  from StreamingCommunity.Util.headers import get_userAgent
12
8
  from StreamingCommunity.Util.http_client import create_client
13
9
 
14
10
 
15
- # Variable
16
- MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
17
- REQUEST_VERIFY = config_manager.get_bool('REQUESTS', 'verify')
18
-
19
11
  class VideoSource:
20
12
  def __init__(self, site_url, episode_data, session_id, csrf_token):
21
13
  """Initialize the VideoSource with session details, episode data, and URL."""
@@ -44,4 +36,4 @@ class VideoSource:
44
36
 
45
37
  except Exception as e:
46
38
  logging.error(f"Error in new API system: {e}")
47
- return None
39
+ return None
@@ -6,21 +6,18 @@ from urllib.parse import urlparse, parse_qs, urlencode, urlunparse
6
6
 
7
7
 
8
8
  # External libraries
9
- import httpx
10
9
  from bs4 import BeautifulSoup
11
10
  from rich.console import Console
12
11
 
13
12
 
14
13
  # Internal utilities
15
14
  from StreamingCommunity.Util.headers import get_userAgent
16
- from StreamingCommunity.Util.config_json import config_manager
15
+ from StreamingCommunity.Util.http_client import create_client
17
16
  from .Helper.Vixcloud.util import WindowVideo, WindowParameter, StreamsCollection
18
17
  from .Helper.Vixcloud.js_parser import JavaScriptParser
19
18
 
20
19
 
21
20
  # Variable
22
- MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
23
- REQUEST_VERIFY = config_manager.get_bool('REQUESTS', 'verify')
24
21
  console = Console()
25
22
 
26
23
 
@@ -57,7 +54,7 @@ class VideoSource:
57
54
  }
58
55
 
59
56
  try:
60
- response = httpx.get(f"{self.url}/iframe/{self.media_id}", headers=self.headers, params=params, timeout=MAX_TIMEOUT, verify=REQUEST_VERIFY)
57
+ response = create_client(headers=self.headers).get(f"{self.url}/iframe/{self.media_id}", params=params)
61
58
  response.raise_for_status()
62
59
 
63
60
  # Parse response with BeautifulSoup to get iframe source
@@ -100,7 +97,7 @@ class VideoSource:
100
97
  """
101
98
  try:
102
99
  if self.iframe_src is not None:
103
- response = httpx.get(self.iframe_src, headers=self.headers, timeout=MAX_TIMEOUT, verify=REQUEST_VERIFY)
100
+ response = create_client(headers=self.headers).get(self.iframe_src)
104
101
  response.raise_for_status()
105
102
 
106
103
  # Parse response with BeautifulSoup to get content
@@ -110,14 +107,6 @@ class VideoSource:
110
107
  # Parse script to get video information
111
108
  self.parse_script(script_text=script)
112
109
 
113
- except httpx.HTTPStatusError as e:
114
- if e.response.status_code == 404:
115
- console.print("[yellow]This content will be available soon![/yellow]")
116
- return
117
-
118
- logging.error(f"Error getting content: {e}")
119
- raise
120
-
121
110
  except Exception as e:
122
111
  logging.error(f"Error getting content: {e}")
123
112
  raise
@@ -178,7 +167,7 @@ class VideoSourceAnime(VideoSource):
178
167
  str: Parsed script content
179
168
  """
180
169
  try:
181
- response = httpx.get(f"{self.url}/embed-url/{episode_id}", headers=self.headers, timeout=MAX_TIMEOUT, verify=REQUEST_VERIFY)
170
+ response = create_client(headers=self.headers).get(f"{self.url}/embed-url/{episode_id}")
182
171
  response.raise_for_status()
183
172
 
184
173
  # Extract and clean embed URL
@@ -186,7 +175,7 @@ class VideoSourceAnime(VideoSource):
186
175
  self.iframe_src = embed_url
187
176
 
188
177
  # Fetch video content using embed URL
189
- video_response = httpx.get(embed_url, verify=REQUEST_VERIFY)
178
+ video_response = create_client(headers=self.headers).get(embed_url)
190
179
  video_response.raise_for_status()
191
180
 
192
181
  # Parse response with BeautifulSoup to get content of the scriot
@@ -15,7 +15,7 @@ from StreamingCommunity.Util.headers import get_headers
15
15
  from StreamingCommunity.Util.http_client import create_client
16
16
  from StreamingCommunity.Util.message import start_message
17
17
  from StreamingCommunity.Util.config_json import config_manager
18
- from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance, TelegramSession
18
+ from StreamingCommunity.TelegramHelp.telegram_bot import TelegramSession
19
19
 
20
20
 
21
21
  # Logic class
@@ -30,7 +30,7 @@ from StreamingCommunity.Api.Player.supervideo import VideoSource
30
30
 
31
31
  # Variable
32
32
  console = Console()
33
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
33
+ extension_output = config_manager.get("M3U8_CONVERSION", "extension")
34
34
 
35
35
 
36
36
  def download_film(select_title: MediaItem) -> str:
@@ -43,18 +43,6 @@ def download_film(select_title: MediaItem) -> str:
43
43
  Return:
44
44
  - str: output path if successful, otherwise None
45
45
  """
46
- if site_constant.TELEGRAM_BOT:
47
- bot = get_bot_instance()
48
- bot.send_message(f"Download in corso:\n{select_title.name}", None)
49
-
50
- # Viene usato per lo screen
51
- console.print(f"## Download: [red]{select_title.name} ##")
52
-
53
- # Get script_id
54
- script_id = TelegramSession.get_session()
55
- if script_id != "unknown":
56
- TelegramSession.updateScriptId(script_id, select_title.name)
57
-
58
46
  start_message()
59
47
  console.print(f"\n[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [cyan]{select_title.name}[/cyan] \n")
60
48
 
@@ -92,8 +80,8 @@ def download_film(select_title: MediaItem) -> str:
92
80
  master_playlist = video_source.get_playlist()
93
81
 
94
82
  # Define the filename and path for the downloaded film
95
- title_name = os_manager.get_sanitize_file(select_title.name) + ".mp4"
96
- mp4_path = os.path.join(site_constant.MOVIE_FOLDER, title_name.replace(".mp4", ""))
83
+ title_name = os_manager.get_sanitize_file(select_title.name, select_title.date) + extension_output
84
+ mp4_path = os.path.join(site_constant.MOVIE_FOLDER, title_name.replace(extension_output, ""))
97
85
 
98
86
  # Download the film using the m3u8 playlist, and output filename
99
87
  hls_process = HLS_Downloader(
@@ -21,7 +21,8 @@ from StreamingCommunity.Api.Template.Util import (
21
21
  map_episode_title,
22
22
  validate_selection,
23
23
  validate_episode_selection,
24
- display_episodes_list
24
+ display_episodes_list,
25
+ display_seasons_list
25
26
  )
26
27
  from StreamingCommunity.Api.Template.config_loader import site_constant
27
28
  from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
@@ -151,16 +152,11 @@ def download_series(select_season: MediaItem, season_selection: str = None, epis
151
152
  - episode_selection (str, optional): Pre-defined episode selection that bypasses manual input
152
153
  """
153
154
  scrape_serie = GetSerieInfo(select_season.url)
154
-
155
- # Get total number of seasons
156
155
  seasons_count = scrape_serie.getNumberSeason()
157
156
 
158
157
  if site_constant.TELEGRAM_BOT:
159
158
  bot = get_bot_instance()
160
159
 
161
- # Prompt user for season selection and download episodes
162
- console.print(f"\n[green]Seasons found: [red]{seasons_count}")
163
-
164
160
  # If season_selection is provided, use it instead of asking for input
165
161
  if season_selection is None:
166
162
  if site_constant.TELEGRAM_BOT:
@@ -180,10 +176,7 @@ def download_series(select_season: MediaItem, season_selection: str = None, epis
180
176
  )
181
177
 
182
178
  else:
183
- index_season_selected = msg.ask(
184
- "\n[cyan]Insert season number [yellow](e.g., 1), [red]* [cyan]to download all seasons, "
185
- "[yellow](e.g., 1-2) [cyan]for a range of seasons, or [yellow](e.g., 3-*) [cyan]to download from a specific season to the end"
186
- )
179
+ index_season_selected = display_seasons_list(scrape_serie.seasons_manager)
187
180
  else:
188
181
  index_season_selected = season_selection
189
182
  console.print(f"\n[cyan]Using provided season selection: [yellow]{season_selection}")
@@ -195,10 +188,8 @@ def download_series(select_season: MediaItem, season_selection: str = None, epis
195
188
  # Loop through the selected seasons and download episodes
196
189
  for i_season in list_season_select:
197
190
  if len(list_season_select) > 1 or index_season_selected == "*":
198
- # Download all episodes if multiple seasons are selected or if '*' is used
199
191
  download_episode(i_season, scrape_serie, download_all=True)
200
192
  else:
201
- # Otherwise, let the user select specific episodes for the single season
202
193
  download_episode(i_season, scrape_serie, download_all=False, episode_selection=episode_selection)
203
194
 
204
195
  if site_constant.TELEGRAM_BOT:
@@ -2,14 +2,13 @@
2
2
 
3
3
 
4
4
  # External libraries
5
- import httpx
6
5
  from bs4 import BeautifulSoup
7
6
  from rich.console import Console
8
7
 
9
8
 
10
9
  # Internal utilities
11
- from StreamingCommunity.Util.config_json import config_manager
12
10
  from StreamingCommunity.Util.headers import get_userAgent
11
+ from StreamingCommunity.Util.http_client import create_client
13
12
  from StreamingCommunity.Util.table import TVShowManager
14
13
  from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
15
14
 
@@ -23,7 +22,6 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
23
22
  console = Console()
24
23
  media_search_manager = MediaManager()
25
24
  table_show_manager = TVShowManager()
26
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
27
25
 
28
26
 
29
27
  def title_search(query: str) -> int:
@@ -46,12 +44,7 @@ def title_search(query: str) -> int:
46
44
  console.print(f"[cyan]Search url: [yellow]{search_url}")
47
45
 
48
46
  try:
49
- response = httpx.post(
50
- search_url,
51
- headers={'user-agent': get_userAgent()},
52
- timeout=max_timeout,
53
- follow_redirects=True
54
- )
47
+ response = create_client(headers={'user-agent': get_userAgent()}).get(search_url)
55
48
  response.raise_for_status()
56
49
 
57
50
  except Exception as e:
@@ -4,20 +4,15 @@ import logging
4
4
 
5
5
 
6
6
  # External libraries
7
- import httpx
8
7
  from bs4 import BeautifulSoup
9
8
 
10
9
 
11
10
  # Internal utilities
12
11
  from StreamingCommunity.Util.headers import get_userAgent
13
- from StreamingCommunity.Util.config_json import config_manager
12
+ from StreamingCommunity.Util.http_client import create_client
14
13
  from StreamingCommunity.Api.Player.Helper.Vixcloud.util import SeasonManager
15
14
 
16
15
 
17
- # Variable
18
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
19
-
20
-
21
16
  class GetSerieInfo:
22
17
  def __init__(self, url):
23
18
  """
@@ -34,7 +29,7 @@ class GetSerieInfo:
34
29
  """
35
30
  Retrieve all episodes for all seasons
36
31
  """
37
- response = httpx.get(self.url, headers=self.headers)
32
+ response = create_client(headers=self.headers).get(self.url)
38
33
  soup = BeautifulSoup(response.text, "html.parser")
39
34
  self.series_name = soup.find("title").get_text(strip=True).split(" - ")[0]
40
35
 
@@ -1,15 +1,15 @@
1
1
  # 10.12.23
2
2
 
3
- # External libraries
4
3
  import urllib.parse
5
- import httpx
6
- from curl_cffi import requests
4
+
5
+
6
+ # External libraries
7
7
  from rich.console import Console
8
8
 
9
9
 
10
10
  # Internal utilities
11
- from StreamingCommunity.Util.config_json import config_manager
12
11
  from StreamingCommunity.Util.headers import get_userAgent
12
+ from StreamingCommunity.Util.http_client import create_client_curl
13
13
  from StreamingCommunity.Util.table import TVShowManager
14
14
  from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
15
15
 
@@ -18,21 +18,18 @@ from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
18
18
  from StreamingCommunity.Api.Template.config_loader import site_constant
19
19
  from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
20
20
 
21
+
22
+ # Variable
21
23
  console = Console()
22
24
  media_search_manager = MediaManager()
23
25
  table_show_manager = TVShowManager()
24
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
25
26
 
26
27
 
27
28
  def get_token(user_agent: str) -> dict:
28
29
  """
29
30
  Retrieve session cookies from the site.
30
31
  """
31
- response = requests.get(
32
- site_constant.FULL_URL,
33
- headers={'user-agent': user_agent},
34
- impersonate="chrome120"
35
- )
32
+ response = create_client_curl(headers={'user-agent': user_agent}).get(site_constant.FULL_URL)
36
33
  response.raise_for_status()
37
34
  all_cookies = {name: value for name, value in response.cookies.items()}
38
35
 
@@ -80,13 +77,7 @@ def title_search(query: str) -> int:
80
77
 
81
78
  # First call: /livesearch
82
79
  try:
83
- response1 = httpx.post(
84
- f'{site_constant.FULL_URL}/livesearch',
85
- cookies=cookies,
86
- headers=headers,
87
- json={'title': query},
88
- timeout=max_timeout
89
- )
80
+ response1 = create_client_curl(headers=headers).post(f'{site_constant.FULL_URL}/livesearch', cookies=cookies, data={'title': query})
90
81
  response1.raise_for_status()
91
82
  process_results(response1.json().get('records', []), seen_titles, media_search_manager, choices)
92
83
 
@@ -107,13 +98,7 @@ def title_search(query: str) -> int:
107
98
  'dubbed': False,
108
99
  'season': False
109
100
  }
110
- response2 = httpx.post(
111
- f'{site_constant.FULL_URL}/archivio/get-animes',
112
- cookies=cookies,
113
- headers=headers,
114
- json=json_data,
115
- timeout=max_timeout
116
- )
101
+ response2 = create_client_curl(headers=headers).post(f'{site_constant.FULL_URL}/archivio/get-animes', cookies=cookies, data=json_data)
117
102
  response2.raise_for_status()
118
103
  process_results(response2.json().get('records', []), seen_titles, media_search_manager, choices)
119
104
 
@@ -3,21 +3,12 @@
3
3
  import logging
4
4
 
5
5
 
6
- # External libraries
7
- import httpx
8
-
9
-
10
6
  # Internal utilities
11
- from StreamingCommunity.Util.headers import get_userAgent
12
- from StreamingCommunity.Util.config_json import config_manager
7
+ from StreamingCommunity.Util.headers import get_headers
8
+ from StreamingCommunity.Util.http_client import create_client_curl
13
9
  from StreamingCommunity.Api.Player.Helper.Vixcloud.util import EpisodeManager, Episode
14
10
 
15
11
 
16
- # Variable
17
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
18
-
19
-
20
-
21
12
  class ScrapeSerieAnime:
22
13
  def __init__(self, url: str):
23
14
  """
@@ -27,7 +18,7 @@ class ScrapeSerieAnime:
27
18
  url (str): Url of the streaming site
28
19
  """
29
20
  self.is_series = False
30
- self.headers = {'user-agent': get_userAgent()}
21
+ self.headers = get_headers()
31
22
  self.url = url
32
23
  self.episodes_cache = None
33
24
 
@@ -61,11 +52,7 @@ class ScrapeSerieAnime:
61
52
  """
62
53
  try:
63
54
  # Get initial episode count
64
- response = httpx.get(
65
- url=f"{self.url}/info_api/{self.media_id}/",
66
- headers=self.headers,
67
- timeout=max_timeout
68
- )
55
+ response = create_client_curl(headers=self.headers).get(f"{self.url}/info_api/{self.media_id}/")
69
56
  response.raise_for_status()
70
57
  initial_count = response.json()["episodes_count"]
71
58
 
@@ -75,18 +62,15 @@ class ScrapeSerieAnime:
75
62
  # Fetch episodes in chunks
76
63
  while start_range <= initial_count:
77
64
  end_range = min(start_range + 119, initial_count)
65
+
66
+ params={
67
+ "start_range": start_range,
68
+ "end_range": end_range
69
+ }
78
70
 
79
- response = httpx.get(
80
- url=f"{self.url}/info_api/{self.media_id}/1",
81
- params={
82
- "start_range": start_range,
83
- "end_range": end_range
84
- },
85
- headers=self.headers,
86
- timeout=max_timeout
87
- )
71
+ response = create_client_curl(headers=self.headers).get(f"{self.url}/info_api/{self.media_id}/1", params=params)
88
72
  response.raise_for_status()
89
-
73
+
90
74
  chunk_episodes = response.json().get("episodes", [])
91
75
  all_episodes.extend(chunk_episodes)
92
76
  start_range = end_range + 1
@@ -2,6 +2,7 @@
2
2
 
3
3
  import os
4
4
 
5
+
5
6
  # External library
6
7
  from rich.console import Console
7
8
 
@@ -44,8 +45,9 @@ def download_film(select_title: MediaItem):
44
45
  console.print(f"\n[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] ([cyan]{scrape_serie.get_name()}[/cyan]) \n")
45
46
 
46
47
  # Define filename and path for the downloaded video
47
- mp4_name = f"{scrape_serie.get_name()}.mp4"
48
- mp4_path = os.path.join(site_constant.ANIME_FOLDER, scrape_serie.get_name())
48
+ serie_name_with_year = os_manager.get_sanitize_file(scrape_serie.get_name(), select_title.date)
49
+ mp4_name = f"{serie_name_with_year}.mp4"
50
+ mp4_path = os.path.join(site_constant.ANIME_FOLDER, serie_name_with_year.replace('.mp4', ''))
49
51
 
50
52
  # Create output folder
51
53
  os_manager.create_path(mp4_path)
@@ -2,15 +2,14 @@
2
2
 
3
3
  import logging
4
4
 
5
+
5
6
  # External libraries
6
- import httpx
7
7
  from bs4 import BeautifulSoup
8
8
  from rich.console import Console
9
9
 
10
10
 
11
11
  # Internal utilities
12
- from StreamingCommunity.Util.config_json import config_manager
13
- from StreamingCommunity.Util.headers import get_userAgent, get_headers
12
+ from StreamingCommunity.Util.headers import get_headers
14
13
  from StreamingCommunity.Util.http_client import create_client
15
14
  from StreamingCommunity.Util.table import TVShowManager
16
15
 
@@ -24,7 +23,6 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
24
23
  console = Console()
25
24
  media_search_manager = MediaManager()
26
25
  table_show_manager = TVShowManager()
27
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
28
26
 
29
27
 
30
28
  def get_session_and_csrf() -> dict:
@@ -72,13 +70,7 @@ def title_search(query: str) -> int:
72
70
 
73
71
  # Make the GET request
74
72
  try:
75
- response = httpx.get(
76
- search_url,
77
- headers={'User-Agent': get_userAgent()},
78
- timeout=max_timeout,
79
- verify=False
80
- )
81
-
73
+ response = create_client(headers=get_headers()).get(search_url)
82
74
  except Exception as e:
83
75
  console.print(f"[red]Site: {site_constant.SITE_NAME}, request search error: {e}")
84
76
  return 0
@@ -10,7 +10,6 @@ from bs4 import BeautifulSoup
10
10
  # Internal utilities
11
11
  from StreamingCommunity.Util.headers import get_userAgent
12
12
  from StreamingCommunity.Util.http_client import create_client
13
- from StreamingCommunity.Util.config_json import config_manager
14
13
  from StreamingCommunity.Util.os import os_manager
15
14
 
16
15
 
@@ -19,8 +18,6 @@ from ..site import get_session_and_csrf
19
18
  from StreamingCommunity.Api.Player.sweetpixel import VideoSource
20
19
 
21
20
 
22
- # Variable
23
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
24
21
 
25
22
 
26
23
  class ScrapSerie:
@@ -34,7 +31,7 @@ class ScrapSerie:
34
31
  )
35
32
 
36
33
  try:
37
- self.response = self.client.get(self.url, timeout=max_timeout, follow_redirects=True)
34
+ self.response = self.client.get(self.url)
38
35
  self.response.raise_for_status()
39
36
 
40
37
  except Exception as e:
@@ -11,7 +11,7 @@ from rich.console import Console
11
11
  # Internal utilities
12
12
  from StreamingCommunity.Util.message import start_message
13
13
  from StreamingCommunity.Util.config_json import config_manager
14
- from StreamingCommunity.Util.os import os_manager, get_wvd_path
14
+ from StreamingCommunity.Util.os import os_manager
15
15
 
16
16
 
17
17
  # Logic class
@@ -26,7 +26,7 @@ from .util.get_license import get_playback_session, CrunchyrollClient
26
26
 
27
27
  # Variable
28
28
  console = Console()
29
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
29
+ extension_output = config_manager.get("M3U8_CONVERSION", "extension")
30
30
 
31
31
 
32
32
  def download_film(select_title: MediaItem) -> str:
@@ -49,8 +49,8 @@ def download_film(select_title: MediaItem) -> str:
49
49
  return None, True
50
50
 
51
51
  # Define filename and path for the downloaded video
52
- mp4_name = os_manager.get_sanitize_file(select_title.name) + ".mp4"
53
- mp4_path = os.path.join(site_constant.MOVIE_FOLDER, mp4_name.replace(".mp4", ""))
52
+ mp4_name = os_manager.get_sanitize_file(select_title.name, select_title.date) + extension_output
53
+ mp4_path = os.path.join(site_constant.MOVIE_FOLDER, mp4_name.replace(extension_output, ""))
54
54
 
55
55
  # Generate mpd and license URLs
56
56
  url_id = select_title.get('url').split('/')[-1]
@@ -60,7 +60,6 @@ def download_film(select_title: MediaItem) -> str:
60
60
 
61
61
  # Download the episode
62
62
  dash_process = DASH_Downloader(
63
- cdm_device=get_wvd_path(),
64
63
  license_url='https://www.crunchyroll.com/license/v1/license/widevine',
65
64
  mpd_url=mpd_url,
66
65
  mpd_sub_list=mpd_list_sub,