StreamingCommunity 3.0.2__tar.gz → 3.0.4__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 (102) hide show
  1. {streamingcommunity-3.0.2/StreamingCommunity.egg-info → streamingcommunity-3.0.4}/PKG-INFO +2 -1
  2. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/hdplayer.py +12 -12
  3. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeworld/site.py +6 -2
  4. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/Proxies/proxy.py +1 -1
  5. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Upload/update.py +23 -22
  6. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Upload/version.py +1 -1
  7. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Util/os.py +38 -0
  8. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/global_search.py +16 -4
  9. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/run.py +11 -2
  10. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4/StreamingCommunity.egg-info}/PKG-INFO +2 -1
  11. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity.egg-info/requires.txt +1 -0
  12. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/requirements.txt +2 -1
  13. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/setup.py +1 -1
  14. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/LICENSE +0 -0
  15. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/MANIFEST.in +0 -0
  16. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/README.md +0 -0
  17. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
  18. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +0 -0
  19. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/ddl.py +0 -0
  20. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/mediapolisvod.py +0 -0
  21. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/mixdrop.py +0 -0
  22. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/supervideo.py +0 -0
  23. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/sweetpixel.py +0 -0
  24. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Player/vixcloud.py +0 -0
  25. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/1337xx/__init__.py +0 -0
  26. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/1337xx/site.py +0 -0
  27. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/1337xx/title.py +0 -0
  28. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/altadefinizione/__init__.py +0 -0
  29. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/altadefinizione/film.py +0 -0
  30. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/altadefinizione/series.py +0 -0
  31. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/altadefinizione/site.py +0 -0
  32. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py +0 -0
  33. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeunity/__init__.py +0 -0
  34. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeunity/film.py +0 -0
  35. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeunity/serie.py +0 -0
  36. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeunity/site.py +0 -0
  37. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +0 -0
  38. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeworld/__init__.py +0 -0
  39. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeworld/film.py +0 -0
  40. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeworld/serie.py +0 -0
  41. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py +0 -0
  42. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +0 -0
  43. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/ddlstreamitaly/series.py +0 -0
  44. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/ddlstreamitaly/site.py +0 -0
  45. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +0 -0
  46. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/guardaserie/__init__.py +0 -0
  47. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/guardaserie/series.py +0 -0
  48. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/guardaserie/site.py +0 -0
  49. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +0 -0
  50. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/raiplay/__init__.py +0 -0
  51. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/raiplay/film.py +0 -0
  52. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/raiplay/series.py +0 -0
  53. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/raiplay/site.py +0 -0
  54. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +0 -0
  55. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +0 -0
  56. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingcommunity/film.py +0 -0
  57. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingcommunity/series.py +0 -0
  58. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingcommunity/site.py +0 -0
  59. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +0 -0
  60. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingwatch/__init__.py +0 -0
  61. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingwatch/film.py +0 -0
  62. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingwatch/series.py +0 -0
  63. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingwatch/site.py +0 -0
  64. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Site/streamingwatch/util/ScrapeSerie.py +0 -0
  65. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
  66. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Template/Util/__init__.py +0 -0
  67. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Template/Util/manage_ep.py +0 -0
  68. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Template/__init__.py +0 -0
  69. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Template/config_loader.py +0 -0
  70. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Api/Template/site.py +0 -0
  71. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +0 -0
  72. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/Downloader/HLS/segments.py +0 -0
  73. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +0 -0
  74. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/Downloader/TOR/downloader.py +0 -0
  75. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/Downloader/__init__.py +0 -0
  76. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -0
  77. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/FFmpeg/capture.py +0 -0
  78. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/FFmpeg/command.py +0 -0
  79. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/FFmpeg/util.py +0 -0
  80. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/M3U8/__init__.py +0 -0
  81. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/M3U8/decryptor.py +0 -0
  82. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/M3U8/estimator.py +0 -0
  83. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/M3U8/parser.py +0 -0
  84. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/M3U8/url_fixer.py +0 -0
  85. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/TMBD/__init__.py +0 -0
  86. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
  87. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Lib/TMBD/tmdb.py +0 -0
  88. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
  89. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/TelegramHelp/telegram_bot.py +0 -0
  90. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Util/color.py +0 -0
  91. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Util/config_json.py +0 -0
  92. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Util/ffmpeg_installer.py +0 -0
  93. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Util/headers.py +0 -0
  94. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Util/logger.py +0 -0
  95. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Util/message.py +0 -0
  96. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/Util/table.py +0 -0
  97. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity/__init__.py +0 -0
  98. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity.egg-info/SOURCES.txt +0 -0
  99. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
  100. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity.egg-info/entry_points.txt +0 -0
  101. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/StreamingCommunity.egg-info/top_level.txt +0 -0
  102. {streamingcommunity-3.0.2 → streamingcommunity-3.0.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: StreamingCommunity
3
- Version: 3.0.2
3
+ Version: 3.0.4
4
4
  Home-page: https://github.com/Lovi-0/StreamingCommunity
5
5
  Author: Lovi-0
6
6
  Project-URL: Bug Reports, https://github.com/Lovi-0/StreamingCommunity/issues
@@ -17,6 +17,7 @@ Requires-Dist: m3u8
17
17
  Requires-Dist: certifi
18
18
  Requires-Dist: psutil
19
19
  Requires-Dist: unidecode
20
+ Requires-Dist: dnspython
20
21
  Requires-Dist: jsbeautifier
21
22
  Requires-Dist: pathvalidate
22
23
  Requires-Dist: pycryptodomex
@@ -2,14 +2,13 @@
2
2
 
3
3
  import re
4
4
 
5
-
6
5
  # External library
7
6
  import httpx
8
7
  from bs4 import BeautifulSoup
9
8
 
10
9
 
11
10
  # Internal utilities
12
- from StreamingCommunity.Util.headers import get_headers
11
+ from StreamingCommunity.Util.headers import get_userAgent
13
12
  from StreamingCommunity.Util.config_json import config_manager
14
13
 
15
14
 
@@ -19,7 +18,7 @@ MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
19
18
 
20
19
  class VideoSource:
21
20
  def __init__(self, proxy=None):
22
- self.client = httpx.Client(headers=get_headers(), timeout=MAX_TIMEOUT, proxy=proxy)
21
+ self.client = httpx.Client(headers={'user-agent': get_userAgent()}, timeout=MAX_TIMEOUT, proxy=proxy)
23
22
 
24
23
  def extractLinkHdPlayer(self, response):
25
24
  """Extract iframe source from the page."""
@@ -34,6 +33,9 @@ class VideoSource:
34
33
  Extract m3u8 URL from hdPlayer page.
35
34
  """
36
35
  try:
36
+ base_domain = re.match(r'https?://(?:www\.)?([^/]+)', page_url).group(0)
37
+ self.client.headers.update({'referer': base_domain})
38
+
37
39
  # Get the page content
38
40
  response = self.client.get(page_url)
39
41
 
@@ -41,19 +43,17 @@ class VideoSource:
41
43
  iframe_url = self.extractLinkHdPlayer(response)
42
44
  if not iframe_url:
43
45
  return None
44
-
46
+
45
47
  # Get HDPlayer page content
46
48
  response_hdplayer = self.client.get(iframe_url)
47
49
  if response_hdplayer.status_code != 200:
48
50
  return None
51
+
52
+ sources_pattern = r'file:"([^"]+)"'
53
+ match = re.search(sources_pattern, response_hdplayer.text)
49
54
 
50
- soup = BeautifulSoup(response_hdplayer.text, 'html.parser')
51
-
52
- # Find m3u8 URL in scripts
53
- for script in soup.find_all("script"):
54
- match = re.search(r'sources:\s*\[\{\s*file:\s*"([^"]+)"', script.text)
55
- if match:
56
- return match.group(1)
55
+ if match:
56
+ return match.group(1)
57
57
 
58
58
  return None
59
59
 
@@ -62,4 +62,4 @@ class VideoSource:
62
62
  return None
63
63
 
64
64
  finally:
65
- self.client.close()
65
+ self.client.close()
@@ -31,7 +31,11 @@ def get_session_and_csrf() -> dict:
31
31
  Get the session ID and CSRF token from the website's cookies and HTML meta data.
32
32
  """
33
33
  # Send an initial GET request to the website
34
- response = httpx.get(site_constant.FULL_URL, headers=get_headers())
34
+ response = httpx.get(
35
+ site_constant.FULL_URL,
36
+ headers=get_headers(),
37
+ verify=False
38
+ )
35
39
 
36
40
  # Extract the sessionId from the cookies
37
41
  session_id = response.cookies.get('sessionId')
@@ -114,4 +118,4 @@ def title_search(query: str) -> int:
114
118
  print(f"Error parsing a film entry: {e}")
115
119
 
116
120
  # Return the length of media search manager
117
- return media_search_manager.get_length()
121
+ return media_search_manager.get_length()
@@ -103,7 +103,7 @@ class ProxyFinder:
103
103
  return proxies
104
104
 
105
105
  def fetch_proxies_from_sources(self) -> list:
106
- print("[cyan]Fetching proxies from sources...[/cyan]")
106
+ #print("[cyan]Fetching proxies from sources...[/cyan]")
107
107
  with ThreadPoolExecutor(max_workers=3) as executor:
108
108
  proxyscrape_future = executor.submit(self.fetch_proxyscrape)
109
109
  geonode_future = executor.submit(self.fetch_geonode)
@@ -3,7 +3,7 @@
3
3
  import os
4
4
  import sys
5
5
  import time
6
-
6
+ import asyncio
7
7
 
8
8
  # External library
9
9
  import httpx
@@ -24,32 +24,33 @@ else:
24
24
  base_path = os.path.dirname(__file__)
25
25
  console = Console()
26
26
 
27
+ async def fetch_github_data(client, url):
28
+ """Helper function to fetch data from GitHub API"""
29
+ response = await client.get(
30
+ url=url,
31
+ headers={'user-agent': get_userAgent()},
32
+ timeout=config_manager.get_int("REQUESTS", "timeout"),
33
+ follow_redirects=True
34
+ )
35
+ return response.json()
36
+
37
+ async def async_github_requests():
38
+ """Make concurrent GitHub API requests"""
39
+ async with httpx.AsyncClient() as client:
40
+ tasks = [
41
+ fetch_github_data(client, f"https://api.github.com/repos/{__author__}/{__title__}"),
42
+ fetch_github_data(client, f"https://api.github.com/repos/{__author__}/{__title__}/releases"),
43
+ fetch_github_data(client, f"https://api.github.com/repos/{__author__}/{__title__}/commits")
44
+ ]
45
+ return await asyncio.gather(*tasks)
27
46
 
28
47
  def update():
29
48
  """
30
49
  Check for updates on GitHub and display relevant information.
31
50
  """
32
51
  try:
33
- response_reposity = httpx.get(
34
- url=f"https://api.github.com/repos/{__author__}/{__title__}",
35
- headers={'user-agent': get_userAgent()},
36
- timeout=config_manager.get_int("REQUESTS", "timeout"),
37
- follow_redirects=True
38
- ).json()
39
-
40
- response_releases = httpx.get(
41
- url=f"https://api.github.com/repos/{__author__}/{__title__}/releases",
42
- headers={'user-agent': get_userAgent()},
43
- timeout=config_manager.get_int("REQUESTS", "timeout"),
44
- follow_redirects=True
45
- ).json()
46
-
47
- response_commits = httpx.get(
48
- url=f"https://api.github.com/repos/{__author__}/{__title__}/commits",
49
- headers={'user-agent': get_userAgent()},
50
- timeout=config_manager.get_int("REQUESTS", "timeout"),
51
- follow_redirects=True
52
- ).json()
52
+ # Run async requests concurrently
53
+ response_reposity, response_releases, response_commits = asyncio.run(async_github_requests())
53
54
 
54
55
  except Exception as e:
55
56
  console.print(f"[red]Error accessing GitHub API: {e}")
@@ -92,4 +93,4 @@ def update():
92
93
  console.print(f"\n[red]{__title__} has been downloaded [yellow]{total_download_count} [red]times, but only [yellow]{percentual_stars}% [red]of users have starred it.\n\
93
94
  [cyan]Help the repository grow today by leaving a [yellow]star [cyan]and [yellow]sharing [cyan]it with others online!")
94
95
 
95
- time.sleep(3)
96
+ time.sleep(4)
@@ -1,5 +1,5 @@
1
1
  __title__ = 'StreamingCommunity'
2
- __version__ = '3.0.2'
2
+ __version__ = '3.0.4'
3
3
  __author__ = 'Arrowar'
4
4
  __description__ = 'A command-line program to download film'
5
5
  __copyright__ = 'Copyright 2024'
@@ -19,6 +19,7 @@ from unidecode import unidecode
19
19
  from rich.console import Console
20
20
  from rich.prompt import Prompt
21
21
  from pathvalidate import sanitize_filename, sanitize_filepath
22
+ from dns.resolver import dns
22
23
 
23
24
 
24
25
  # Internal utilities
@@ -282,6 +283,43 @@ class InternManager():
282
283
  else:
283
284
  return f"{bytes / (1024 * 1024):.2f} MB/s"
284
285
 
286
+ def check_dns_provider(self):
287
+ """
288
+ Check if the system's current DNS server matches any known DNS providers.
289
+
290
+ Returns:
291
+ bool: True if the current DNS server matches a known provider,
292
+ False if no match is found or in case of errors
293
+ """
294
+ dns_providers = {
295
+ "Cloudflare": ["1.1.1.1", "1.0.0.1"],
296
+ "Google": ["8.8.8.8", "8.8.4.4"],
297
+ "OpenDNS": ["208.67.222.222", "208.67.220.220"],
298
+ "Quad9": ["9.9.9.9", "149.112.112.112"],
299
+ "AdGuard": ["94.140.14.14", "94.140.15.15"],
300
+ "Comodo": ["8.26.56.26", "8.20.247.20"],
301
+ "Level3": ["209.244.0.3", "209.244.0.4"],
302
+ "Norton": ["199.85.126.10", "199.85.127.10"],
303
+ "CleanBrowsing": ["185.228.168.9", "185.228.169.9"],
304
+ "Yandex": ["77.88.8.8", "77.88.8.1"]
305
+ }
306
+
307
+ try:
308
+ resolver = dns.resolver.Resolver()
309
+ nameservers = resolver.nameservers
310
+
311
+ if not nameservers:
312
+ return False
313
+
314
+ for server in nameservers:
315
+ for provider, ips in dns_providers.items():
316
+ if server in ips:
317
+ return True
318
+ return False
319
+
320
+ except Exception:
321
+ return False
322
+
285
323
 
286
324
  class OsSummary:
287
325
  def __init__(self):
@@ -58,7 +58,10 @@ def load_search_functions():
58
58
  # Get 'indice' from the module
59
59
  indice = getattr(mod, 'indice', 0)
60
60
  use_for = getattr(mod, '_useFor', 'other')
61
- modules.append((module_name, indice, use_for))
61
+ priority = getattr(mod, '_priority', 0)
62
+
63
+ if priority == 0:
64
+ modules.append((module_name, indice, use_for))
62
65
 
63
66
  except Exception as e:
64
67
  console.print(f"[red]Failed to import module {module_name}: {str(e)}")
@@ -296,17 +299,26 @@ def process_selected_item(selected_item, search_functions):
296
299
  console.print(f"\n[bold green]Processing selection from:[/bold green] {selected_item.get('source')}")
297
300
 
298
301
  # Extract necessary information to pass to the site's search function
299
- item_id = selected_item.get('id', selected_item.get('media_id'))
302
+ item_id = None
303
+ for id_field in ['id', 'media_id', 'ID', 'item_id', 'url']:
304
+ item_id = selected_item.get(id_field)
305
+ if item_id:
306
+ break
307
+
300
308
  item_type = selected_item.get('type', selected_item.get('media_type', 'unknown'))
301
309
  item_title = selected_item.get('title', selected_item.get('name', 'Unknown'))
302
310
 
303
311
  if item_id:
304
312
  console.print(f"[bold green]Selected item:[/bold green] {item_title} (ID: {item_id}, Type: {item_type})")
305
313
 
306
- # Call the site's search function with direct_item parameter to process download
307
314
  try:
308
315
  func(direct_item=selected_item)
316
+
309
317
  except Exception as e:
310
318
  console.print(f"[bold red]Error processing download:[/bold red] {str(e)}")
319
+ logging.exception("Download processing error")
320
+
311
321
  else:
312
- console.print("[bold red]Error: Item ID not found.[/bold red]")
322
+ console.print("[bold red]Error: Item ID not found. Available fields:[/bold red]")
323
+ for key in selected_item.keys():
324
+ console.print(f"[yellow]- {key}: {selected_item[key]}[/yellow]")
@@ -21,7 +21,7 @@ from rich.prompt import Prompt
21
21
  from .global_search import global_search
22
22
  from StreamingCommunity.Util.message import start_message
23
23
  from StreamingCommunity.Util.config_json import config_manager
24
- from StreamingCommunity.Util.os import os_summary
24
+ from StreamingCommunity.Util.os import os_summary, internet_manager
25
25
  from StreamingCommunity.Util.logger import Logger
26
26
  from StreamingCommunity.Upload.update import update as git_update
27
27
  from StreamingCommunity.Lib.TMBD import tmdb
@@ -200,6 +200,15 @@ def main(script_id = 0):
200
200
  # Create logger
201
201
  log_not = Logger()
202
202
  initialize()
203
+
204
+ if not internet_manager.check_dns_provider():
205
+ console.print("[red]❌ ERROR: DNS configuration is required!")
206
+ console.print("[red]The program cannot function correctly without proper DNS settings.")
207
+ console.print("[yellow]Please configure one of these DNS servers:")
208
+ console.print("[blue]• Cloudflare (1.1.1.1)")
209
+ console.print("[blue]• Quad9 (9.9.9.9)")
210
+ console.print("\n[yellow]⚠️ The program will not work until you configure your DNS settings.")
211
+ input("[yellow]Press Enter to exit...")
203
212
 
204
213
  # Load search functions
205
214
  search_functions = load_search_functions()
@@ -381,4 +390,4 @@ def main(script_id = 0):
381
390
  # Delete script_id
382
391
  script_id = TelegramSession.get_session()
383
392
  if script_id != "unknown":
384
- TelegramSession.deleteScriptId(script_id)
393
+ TelegramSession.deleteScriptId(script_id)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: StreamingCommunity
3
- Version: 3.0.2
3
+ Version: 3.0.4
4
4
  Home-page: https://github.com/Lovi-0/StreamingCommunity
5
5
  Author: Lovi-0
6
6
  Project-URL: Bug Reports, https://github.com/Lovi-0/StreamingCommunity/issues
@@ -17,6 +17,7 @@ Requires-Dist: m3u8
17
17
  Requires-Dist: certifi
18
18
  Requires-Dist: psutil
19
19
  Requires-Dist: unidecode
20
+ Requires-Dist: dnspython
20
21
  Requires-Dist: jsbeautifier
21
22
  Requires-Dist: pathvalidate
22
23
  Requires-Dist: pycryptodomex
@@ -6,6 +6,7 @@ m3u8
6
6
  certifi
7
7
  psutil
8
8
  unidecode
9
+ dnspython
9
10
  jsbeautifier
10
11
  pathvalidate
11
12
  pycryptodomex
@@ -6,9 +6,10 @@ m3u8
6
6
  certifi
7
7
  psutil
8
8
  unidecode
9
+ dnspython
9
10
  jsbeautifier
10
11
  pathvalidate
11
12
  pycryptodomex
12
13
  ua-generator
13
14
  qbittorrent-api
14
- pyTelegramBotAPI
15
+ pyTelegramBotAPI
@@ -10,7 +10,7 @@ with open(os.path.join(os.path.dirname(__file__), "requirements.txt"), "r", enco
10
10
 
11
11
  setup(
12
12
  name="StreamingCommunity",
13
- version="3.0.2",
13
+ version="3.0.4",
14
14
  long_description=read_readme(),
15
15
  long_description_content_type="text/markdown",
16
16
  author="Lovi-0",