StreamingCommunity 2.6.1__py3-none-any.whl → 2.8.0__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 (76) hide show
  1. StreamingCommunity/Api/Player/ddl.py +4 -4
  2. StreamingCommunity/Api/Player/maxstream.py +10 -16
  3. StreamingCommunity/Api/Player/supervideo.py +9 -35
  4. StreamingCommunity/Api/Player/vixcloud.py +18 -92
  5. StreamingCommunity/Api/Site/1337xx/__init__.py +8 -1
  6. StreamingCommunity/Api/Site/1337xx/site.py +16 -15
  7. StreamingCommunity/Api/Site/1337xx/title.py +7 -5
  8. StreamingCommunity/Api/Site/animeunity/__init__.py +9 -2
  9. StreamingCommunity/Api/Site/animeunity/film_serie.py +12 -5
  10. StreamingCommunity/Api/Site/animeunity/site.py +14 -10
  11. StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +9 -10
  12. StreamingCommunity/Api/Site/cb01new/__init__.py +8 -1
  13. StreamingCommunity/Api/Site/cb01new/film.py +7 -1
  14. StreamingCommunity/Api/Site/cb01new/site.py +24 -15
  15. StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +9 -2
  16. StreamingCommunity/Api/Site/ddlstreamitaly/series.py +7 -1
  17. StreamingCommunity/Api/Site/ddlstreamitaly/site.py +16 -15
  18. StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +3 -3
  19. StreamingCommunity/Api/Site/guardaserie/__init__.py +9 -2
  20. StreamingCommunity/Api/Site/guardaserie/series.py +9 -1
  21. StreamingCommunity/Api/Site/guardaserie/site.py +23 -22
  22. StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +5 -4
  23. StreamingCommunity/Api/Site/mostraguarda/__init__.py +6 -2
  24. StreamingCommunity/Api/Site/mostraguarda/film.py +10 -6
  25. StreamingCommunity/Api/Site/streamingcommunity/__init__.py +9 -2
  26. StreamingCommunity/Api/Site/streamingcommunity/film.py +9 -2
  27. StreamingCommunity/Api/Site/streamingcommunity/series.py +15 -6
  28. StreamingCommunity/Api/Site/streamingcommunity/site.py +16 -14
  29. StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +10 -11
  30. StreamingCommunity/Api/Template/Util/__init__.py +0 -1
  31. StreamingCommunity/Api/Template/Util/get_domain.py +31 -134
  32. StreamingCommunity/Api/Template/Util/manage_ep.py +10 -5
  33. StreamingCommunity/Api/Template/config_loader.py +14 -10
  34. StreamingCommunity/Api/Template/site.py +3 -6
  35. StreamingCommunity/Lib/Downloader/HLS/downloader.py +12 -15
  36. StreamingCommunity/Lib/Downloader/HLS/segments.py +14 -34
  37. StreamingCommunity/Lib/Downloader/MP4/downloader.py +14 -11
  38. StreamingCommunity/Lib/Downloader/TOR/downloader.py +109 -101
  39. StreamingCommunity/Lib/FFmpeg/__init__.py +1 -1
  40. StreamingCommunity/Lib/FFmpeg/capture.py +10 -12
  41. StreamingCommunity/Lib/FFmpeg/command.py +15 -14
  42. StreamingCommunity/Lib/FFmpeg/util.py +9 -38
  43. StreamingCommunity/Lib/M3U8/decryptor.py +72 -146
  44. StreamingCommunity/Lib/M3U8/estimator.py +8 -16
  45. StreamingCommunity/Lib/M3U8/parser.py +1 -17
  46. StreamingCommunity/Lib/M3U8/url_fixer.py +1 -4
  47. StreamingCommunity/Lib/TMBD/__init__.py +2 -0
  48. StreamingCommunity/Lib/TMBD/obj_tmbd.py +3 -17
  49. StreamingCommunity/Lib/TMBD/tmdb.py +4 -9
  50. StreamingCommunity/TelegramHelp/telegram_bot.py +50 -50
  51. StreamingCommunity/Upload/update.py +6 -5
  52. StreamingCommunity/Upload/version.py +1 -1
  53. StreamingCommunity/Util/color.py +1 -1
  54. StreamingCommunity/Util/config_json.py +435 -0
  55. StreamingCommunity/Util/headers.py +7 -36
  56. StreamingCommunity/Util/logger.py +72 -42
  57. StreamingCommunity/Util/message.py +8 -3
  58. StreamingCommunity/Util/os.py +41 -93
  59. StreamingCommunity/Util/table.py +8 -17
  60. StreamingCommunity/run.py +39 -43
  61. {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/METADATA +203 -114
  62. StreamingCommunity-2.8.0.dist-info/RECORD +75 -0
  63. StreamingCommunity/Api/Site/ilcorsaronero/__init__.py +0 -53
  64. StreamingCommunity/Api/Site/ilcorsaronero/site.py +0 -64
  65. StreamingCommunity/Api/Site/ilcorsaronero/title.py +0 -42
  66. StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +0 -149
  67. StreamingCommunity/Api/Template/Util/recall_search.py +0 -37
  68. StreamingCommunity/Lib/Downloader/HLS/proxyes.py +0 -110
  69. StreamingCommunity/Util/_jsonConfig.py +0 -241
  70. StreamingCommunity/Util/call_stack.py +0 -42
  71. StreamingCommunity/Util/console.py +0 -12
  72. StreamingCommunity-2.6.1.dist-info/RECORD +0 -83
  73. {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/LICENSE +0 -0
  74. {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/WHEEL +0 -0
  75. {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/entry_points.txt +0 -0
  76. {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/top_level.txt +0 -0
@@ -8,8 +8,8 @@ import httpx
8
8
 
9
9
 
10
10
  # Internal utilities
11
- from StreamingCommunity.Util.headers import get_headers
12
- from StreamingCommunity.Util._jsonConfig import config_manager
11
+ from StreamingCommunity.Util.headers import get_userAgent
12
+ from StreamingCommunity.Util.config_json import config_manager
13
13
  from StreamingCommunity.Api.Player.Helper.Vixcloud.util import EpisodeManager, Episode
14
14
 
15
15
 
@@ -18,18 +18,17 @@ max_timeout = config_manager.get_int("REQUESTS", "timeout")
18
18
 
19
19
 
20
20
 
21
- class ScrapeSerieAnime():
22
- def __init__(self, site_name: str):
21
+ class ScrapeSerieAnime:
22
+ def __init__(self, url: str):
23
23
  """
24
24
  Initialize the media scraper for a specific website.
25
25
 
26
26
  Args:
27
- site_name (str): Name of the streaming site to scrape
27
+ url (str): Url of the streaming site
28
28
  """
29
29
  self.is_series = False
30
- self.headers = {'user-agent': get_headers()}
31
- self.base_name = site_name
32
- self.domain = config_manager.get_dict('SITE', self.base_name)['domain']
30
+ self.headers = {'user-agent': get_userAgent()}
31
+ self.url = url
33
32
 
34
33
  def setup(self, version: str = None, media_id: int = None, series_name: str = None):
35
34
  self.version = version
@@ -50,7 +49,7 @@ class ScrapeSerieAnime():
50
49
  try:
51
50
 
52
51
  response = httpx.get(
53
- url=f"https://www.{self.base_name}.{self.domain}/info_api/{self.media_id}/",
52
+ url=f"{self.url}/info_api/{self.media_id}/",
54
53
  headers=self.headers,
55
54
  timeout=max_timeout
56
55
  )
@@ -81,7 +80,7 @@ class ScrapeSerieAnime():
81
80
  }
82
81
 
83
82
  response = httpx.get(
84
- url=f"https://www.{self.base_name}.{self.domain}/info_api/{self.media_id}/{index_ep}",
83
+ url=f"{self.url}/info_api/{self.media_id}/{index_ep}",
85
84
  headers=self.headers,
86
85
  params=params,
87
86
  timeout=max_timeout
@@ -3,8 +3,12 @@
3
3
  from urllib.parse import quote_plus
4
4
 
5
5
 
6
+ # External library
7
+ from rich.console import Console
8
+ from rich.prompt import Prompt
9
+
10
+
6
11
  # Internal utilities
7
- from StreamingCommunity.Util.console import console, msg
8
12
  from StreamingCommunity.Api.Template import get_select_title
9
13
 
10
14
 
@@ -21,6 +25,9 @@ _deprecate = False
21
25
  _priority = 2
22
26
  _engineDownload = "mp4"
23
27
 
28
+ msg = Prompt()
29
+ console = Console()
30
+
24
31
 
25
32
  def search(string_to_search: str = None, get_onylDatabase: bool = False):
26
33
  """
@@ -3,8 +3,11 @@
3
3
  import os
4
4
 
5
5
 
6
+ # External library
7
+ from rich.console import Console
8
+
9
+
6
10
  # Internal utilities
7
- from StreamingCommunity.Util.console import console
8
11
  from StreamingCommunity.Util.os import os_manager
9
12
  from StreamingCommunity.Util.message import start_message
10
13
  from StreamingCommunity.Lib.Downloader import HLS_Downloader
@@ -19,6 +22,9 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
19
22
  from StreamingCommunity.Api.Player.maxstream import VideoSource
20
23
 
21
24
 
25
+ # Variable
26
+ console = Console()
27
+
22
28
 
23
29
  def download_film(select_title: MediaItem) -> str:
24
30
  """
@@ -1,13 +1,17 @@
1
1
  # 03.07.24
2
2
 
3
+ import sys
4
+
5
+
3
6
  # External libraries
4
7
  import httpx
5
8
  from bs4 import BeautifulSoup
9
+ from rich.console import Console
6
10
 
7
11
 
8
12
  # Internal utilities
9
- from StreamingCommunity.Util._jsonConfig import config_manager
10
- from StreamingCommunity.Util.headers import get_headers
13
+ from StreamingCommunity.Util.config_json import config_manager
14
+ from StreamingCommunity.Util.headers import get_userAgent
11
15
  from StreamingCommunity.Util.table import TVShowManager
12
16
 
13
17
 
@@ -18,10 +22,10 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
18
22
 
19
23
 
20
24
  # Variable
25
+ console = Console()
21
26
  media_search_manager = MediaManager()
22
27
  table_show_manager = TVShowManager()
23
28
  max_timeout = config_manager.get_int("REQUESTS", "timeout")
24
- disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
25
29
 
26
30
 
27
31
  def title_search(word_to_search: str) -> int:
@@ -37,18 +41,23 @@ def title_search(word_to_search: str) -> int:
37
41
  media_search_manager.clear()
38
42
  table_show_manager.clear()
39
43
 
40
- # Find new domain if prev dont work
41
- domain_to_use = site_constant.DOMAIN_NOW
42
-
43
- if not disable_searchDomain:
44
- domain_to_use, base_url = search_domain(site_constant.SITE_NAME, f"https://{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}")
45
-
46
- response = httpx.get(
47
- url=f"https://{site_constant.SITE_NAME}.{domain_to_use}/?s={word_to_search}",
48
- headers={'user-agent': get_headers()},
49
- timeout=max_timeout
50
- )
51
- response.raise_for_status()
44
+ # Check if domain is working
45
+ domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
46
+
47
+ if domain_to_use is None or base_url is None:
48
+ console.print("[bold red]Error: Unable to determine valid domain or base URL.[/bold red]")
49
+ console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
50
+ sys.exit(1)
51
+
52
+ search_url = f"{site_constant.FULL_URL}/?s={word_to_search}"
53
+ console.print(f"[cyan]Search url: [yellow]{search_url}")
54
+
55
+ try:
56
+ response = httpx.get(url=search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
57
+ response.raise_for_status()
58
+
59
+ except Exception as e:
60
+ console.print(f"Site: {site_constant.SITE_NAME}, request search error: {e}")
52
61
 
53
62
  # Create soup and find table
54
63
  soup = BeautifulSoup(response.text, "html.parser")
@@ -4,13 +4,17 @@ import logging
4
4
  from urllib.parse import quote_plus
5
5
 
6
6
 
7
+ # External library
8
+ from rich.console import Console
9
+ from rich.prompt import Prompt
10
+
11
+
7
12
  # Internal utilities
8
- from StreamingCommunity.Util.console import console, msg
9
13
  from StreamingCommunity.Api.Template import get_select_title
14
+ from StreamingCommunity.Api.Template.config_loader import site_constant
10
15
 
11
16
 
12
17
  # Logic class
13
- from StreamingCommunity.Api.Template.config_loader import site_constant
14
18
  from .site import title_search, media_search_manager, table_show_manager
15
19
  from .series import download_thread
16
20
 
@@ -22,6 +26,9 @@ _deprecate = False
22
26
  _priority = 2
23
27
  _engineDownload = "mp4"
24
28
 
29
+ msg = Prompt()
30
+ console = Console()
31
+
25
32
 
26
33
  def search(string_to_search: str = None, get_onylDatabase: bool = False):
27
34
  """
@@ -5,8 +5,11 @@ from urllib.parse import urlparse
5
5
  from typing import Tuple
6
6
 
7
7
 
8
+ # External library
9
+ from rich.console import Console
10
+
11
+
8
12
  # Internal utilities
9
- from StreamingCommunity.Util.console import console
10
13
  from StreamingCommunity.Util.message import start_message
11
14
  from StreamingCommunity.Util.os import os_manager
12
15
  from StreamingCommunity.Lib.Downloader import MP4_downloader
@@ -28,6 +31,9 @@ from .util.ScrapeSerie import GetSerieInfo
28
31
  from StreamingCommunity.Api.Player.ddl import VideoSource
29
32
 
30
33
 
34
+ # Variable
35
+ console = Console()
36
+
31
37
 
32
38
  def download_video(index_episode_selected: int, scape_info_serie: GetSerieInfo, video_source: VideoSource) -> Tuple[str,bool]:
33
39
  """
@@ -1,17 +1,18 @@
1
1
  # 09.06.24
2
2
 
3
+ import sys
3
4
  import logging
4
5
 
5
6
 
6
7
  # External libraries
7
8
  import httpx
8
9
  from bs4 import BeautifulSoup
10
+ from rich.console import Console
9
11
 
10
12
 
11
13
  # Internal utilities
12
- from StreamingCommunity.Util.console import console
13
- from StreamingCommunity.Util._jsonConfig import config_manager
14
- from StreamingCommunity.Util.headers import get_headers
14
+ from StreamingCommunity.Util.config_json import config_manager
15
+ from StreamingCommunity.Util.headers import get_userAgent
15
16
  from StreamingCommunity.Util.table import TVShowManager
16
17
 
17
18
 
@@ -22,10 +23,10 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
22
23
 
23
24
 
24
25
  # Variable
26
+ console = Console()
25
27
  media_search_manager = MediaManager()
26
28
  table_show_manager = TVShowManager()
27
29
  max_timeout = config_manager.get_int("REQUESTS", "timeout")
28
- disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
29
30
 
30
31
 
31
32
  def title_search(word_to_search: str) -> int:
@@ -41,19 +42,19 @@ def title_search(word_to_search: str) -> int:
41
42
  media_search_manager.clear()
42
43
  table_show_manager.clear()
43
44
 
44
- # Find new domain if prev dont work
45
- domain_to_use = site_constant.DOMAIN_NOW
46
-
47
- if not disable_searchDomain:
48
- domain_to_use, base_url = search_domain(site_constant.SITE_NAME, f"https://{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}")
45
+ # Check if domain is working
46
+ domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
47
+
48
+ if domain_to_use is None or base_url is None:
49
+ console.print("[bold red]Error: Unable to determine valid domain or base URL.[/bold red]")
50
+ console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
51
+ sys.exit(1)
52
+
53
+ search_url = f"{site_constant.FULL_URL}/search/?&q={word_to_search}&quick=1&type=videobox_video&nodes=11"
54
+ console.print(f"[cyan]Search url: [yellow]{search_url}")
49
55
 
50
- # Send request to search for titles
51
56
  try:
52
- response = httpx.get(
53
- url=f"https://{site_constant.SITE_NAME}.{domain_to_use}/search/?&q={word_to_search}&quick=1&type=videobox_video&nodes=11",
54
- headers={'user-agent': get_headers()},
55
- timeout=max_timeout
56
- )
57
+ response = httpx.get(search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
57
58
  response.raise_for_status()
58
59
 
59
60
  except Exception as e:
@@ -11,8 +11,8 @@ from bs4 import BeautifulSoup
11
11
 
12
12
 
13
13
  # Internal utilities
14
- from StreamingCommunity.Util._jsonConfig import config_manager
15
- from StreamingCommunity.Util.headers import get_headers
14
+ from StreamingCommunity.Util.config_json import config_manager
15
+ from StreamingCommunity.Util.headers import get_userAgent
16
16
 
17
17
 
18
18
  # Logic class
@@ -31,7 +31,7 @@ class GetSerieInfo:
31
31
  Parameters:
32
32
  - dict_serie (MediaItem): Dictionary containing series information (optional).
33
33
  """
34
- self.headers = {'user-agent': get_headers()}
34
+ self.headers = {'user-agent': get_userAgent()}
35
35
  self.cookies = cookies
36
36
  self.url = dict_serie.url
37
37
  self.tv_name = None
@@ -3,13 +3,17 @@
3
3
  from urllib.parse import quote_plus
4
4
 
5
5
 
6
+ # External library
7
+ from rich.console import Console
8
+ from rich.prompt import Prompt
9
+
10
+
6
11
  # Internal utilities
7
- from StreamingCommunity.Util.console import console, msg
8
12
  from StreamingCommunity.Api.Template import get_select_title
13
+ from StreamingCommunity.Api.Template.config_loader import site_constant
9
14
 
10
15
 
11
16
  # Logic class
12
- from StreamingCommunity.Api.Template.config_loader import site_constant
13
17
  from .site import title_search, media_search_manager, table_show_manager
14
18
  from .series import download_series
15
19
 
@@ -21,6 +25,9 @@ _deprecate = False
21
25
  _priority = 2
22
26
  _engineDownload = "hls"
23
27
 
28
+ msg = Prompt()
29
+ console = Console()
30
+
24
31
 
25
32
  def search(string_to_search: str = None, get_onylDatabase: bool = False):
26
33
  """
@@ -4,8 +4,12 @@ import os
4
4
  from typing import Tuple
5
5
 
6
6
 
7
+ # External library
8
+ from rich.console import Console
9
+ from rich.prompt import Prompt
10
+
11
+
7
12
  # Internal utilities
8
- from StreamingCommunity.Util.console import console, msg
9
13
  from StreamingCommunity.Util.message import start_message
10
14
  from StreamingCommunity.Lib.Downloader import HLS_Downloader
11
15
 
@@ -28,6 +32,10 @@ from .util.ScrapeSerie import GetSerieInfo
28
32
  from StreamingCommunity.Api.Player.supervideo import VideoSource
29
33
 
30
34
 
35
+ # Variable
36
+ msg = Prompt()
37
+ console = Console()
38
+
31
39
 
32
40
  def download_video(index_season_selected: int, index_episode_selected: int, scape_info_serie: GetSerieInfo) -> Tuple[str,bool]:
33
41
  """
@@ -1,14 +1,16 @@
1
1
  # 09.06.24
2
2
 
3
+ import sys
4
+
5
+
3
6
  # External libraries
4
7
  import httpx
5
8
  from bs4 import BeautifulSoup
6
-
9
+ from rich.console import Console
7
10
 
8
11
  # Internal utilities
9
- from StreamingCommunity.Util.console import console
10
- from StreamingCommunity.Util._jsonConfig import config_manager
11
- from StreamingCommunity.Util.headers import get_headers
12
+ from StreamingCommunity.Util.config_json import config_manager
13
+ from StreamingCommunity.Util.headers import get_userAgent
12
14
  from StreamingCommunity.Util.table import TVShowManager
13
15
 
14
16
 
@@ -19,10 +21,11 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
19
21
 
20
22
 
21
23
  # Variable
24
+ console = Console()
22
25
  media_search_manager = MediaManager()
23
26
  table_show_manager = TVShowManager()
24
27
  max_timeout = config_manager.get_int("REQUESTS", "timeout")
25
- disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
28
+
26
29
 
27
30
 
28
31
  def title_search(word_to_search: str) -> int:
@@ -38,19 +41,19 @@ def title_search(word_to_search: str) -> int:
38
41
  media_search_manager.clear()
39
42
  table_show_manager.clear()
40
43
 
41
- # Find new domain if prev dont work
42
- domain_to_use = site_constant.DOMAIN_NOW
44
+ # Check if domain is working
45
+ domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
46
+
47
+ if domain_to_use is None or base_url is None:
48
+ console.print("[bold red]Error: Unable to determine valid domain or base URL.[/bold red]")
49
+ console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
50
+ sys.exit(1)
43
51
 
44
- if not disable_searchDomain:
45
- domain_to_use, base_url = search_domain(site_constant.SITE_NAME, f"https://{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}")
52
+ search_url = f"{site_constant.FULL_URL}/?story={word_to_search}&do=search&subaction=search"
53
+ console.print(f"[cyan]Search url: [yellow]{search_url}")
46
54
 
47
- # Send request to search for titles
48
55
  try:
49
- response = httpx.get(
50
- url=f"https://guardaserie.{domain_to_use}/?story={word_to_search}&do=search&subaction=search",
51
- headers={'user-agent': get_headers()},
52
- timeout=max_timeout
53
- )
56
+ response = httpx.get(search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
54
57
  response.raise_for_status()
55
58
 
56
59
  except Exception as e:
@@ -58,19 +61,17 @@ def title_search(word_to_search: str) -> int:
58
61
 
59
62
  # Create soup and find table
60
63
  soup = BeautifulSoup(response.text, "html.parser")
61
- table_content = soup.find('div', class_="mlnew-list")
64
+ table_content = soup.find('div', class_="recent-posts")
62
65
 
63
- for serie_div in table_content.find_all('div', class_='mlnew'):
66
+ for serie_div in table_content.find_all('div', class_='post-thumb'):
64
67
  try:
65
68
 
66
- title = serie_div.find('div', class_='mlnh-2').find("h2").get_text(strip=True)
67
- link = serie_div.find('div', class_='mlnh-2').find('a')['href']
68
- imdb_rating = serie_div.find('span', class_='mlnh-imdb').get_text(strip=True)
69
+ title = serie_div.find('a').get("title")
70
+ link = serie_div.find('a').get("href")
69
71
 
70
72
  serie_info = {
71
73
  'name': title,
72
- 'url': link,
73
- 'score': imdb_rating
74
+ 'url': link
74
75
  }
75
76
 
76
77
  media_search_manager.add_media(serie_info)
@@ -10,8 +10,8 @@ from bs4 import BeautifulSoup
10
10
 
11
11
 
12
12
  # Internal utilities
13
- from StreamingCommunity.Util.headers import get_headers
14
- from StreamingCommunity.Util._jsonConfig import config_manager
13
+ from StreamingCommunity.Util.headers import get_userAgent
14
+ from StreamingCommunity.Util.config_json import config_manager
15
15
 
16
16
 
17
17
  # Logic class
@@ -30,7 +30,7 @@ class GetSerieInfo:
30
30
  Parameters:
31
31
  dict_serie (MediaItem): Dictionary containing series information (optional).
32
32
  """
33
- self.headers = {'user-agent': get_headers()}
33
+ self.headers = {'user-agent': get_userAgent()}
34
34
  self.url = dict_serie.url
35
35
  self.tv_name = None
36
36
  self.list_episodes = None
@@ -49,9 +49,10 @@ class GetSerieInfo:
49
49
  response.raise_for_status()
50
50
 
51
51
  soup = BeautifulSoup(response.text, "html.parser")
52
+
52
53
  table_content = soup.find('div', class_="tt_season")
53
54
  seasons_number = len(table_content.find_all("li"))
54
- self.tv_name = soup.find("h1", class_="front_title").get_text(strip=True)
55
+ self.tv_name = soup.find("h1", class_="entry-title").get_text(strip=True)
55
56
 
56
57
  return seasons_number
57
58
 
@@ -3,8 +3,9 @@
3
3
  from urllib.parse import quote_plus
4
4
 
5
5
 
6
- # Internal utilities
7
- from StreamingCommunity.Util.console import console, msg
6
+ # External library
7
+ from rich.console import Console
8
+ from rich.prompt import Prompt, Confirm
8
9
 
9
10
 
10
11
  # Logic class
@@ -20,6 +21,9 @@ _deprecate = False
20
21
  _priority = 2
21
22
  _engineDownload = "hls"
22
23
 
24
+ msg = Prompt()
25
+ console = Console()
26
+
23
27
 
24
28
  def search(string_to_search: str = None, get_onylDatabase: bool = False):
25
29
  """
@@ -7,14 +7,14 @@ import logging
7
7
  # External libraries
8
8
  import httpx
9
9
  from bs4 import BeautifulSoup
10
+ from rich.console import Console
10
11
 
11
12
 
12
13
  # Internal utilities
13
- from StreamingCommunity.Util.console import console
14
- from StreamingCommunity.Util.os import os_manager
14
+ from StreamingCommunity.Util.os import os_manager, get_call_stack
15
15
  from StreamingCommunity.Util.message import start_message
16
- from StreamingCommunity.Util.headers import get_headers
17
- from StreamingCommunity.Util.table import TVShowManager, get_call_stack
16
+ from StreamingCommunity.Util.headers import get_userAgent
17
+ from StreamingCommunity.Util.table import TVShowManager
18
18
  from StreamingCommunity.Lib.Downloader import HLS_Downloader
19
19
 
20
20
 
@@ -27,6 +27,10 @@ from StreamingCommunity.Api.Template.config_loader import site_constant
27
27
  from StreamingCommunity.Lib.TMBD import Json_film
28
28
 
29
29
 
30
+ # Variable
31
+ console = Console()
32
+
33
+
30
34
  def download_film(movie_details: Json_film) -> str:
31
35
  """
32
36
  Downloads a film using the provided tmbd id.
@@ -44,8 +48,8 @@ def download_film(movie_details: Json_film) -> str:
44
48
 
45
49
  # Make request to main site
46
50
  try:
47
- url = f"https://{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}/set-movie-a/{movie_details.imdb_id}"
48
- response = httpx.get(url, headers={'User-Agent': get_headers()})
51
+ url = f"{site_constant.FULL_URL}/set-movie-a/{movie_details.imdb_id}"
52
+ response = httpx.get(url, headers={'User-Agent': get_userAgent()})
49
53
  response.raise_for_status()
50
54
 
51
55
  except:
@@ -5,8 +5,12 @@ import subprocess
5
5
  from urllib.parse import quote_plus
6
6
 
7
7
 
8
+ # External library
9
+ from rich.console import Console
10
+ from rich.prompt import Prompt
11
+
12
+
8
13
  # Internal utilities
9
- from StreamingCommunity.Util.console import console, msg
10
14
  from StreamingCommunity.Api.Template import get_select_title
11
15
  from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
12
16
 
@@ -25,6 +29,9 @@ _deprecate = False
25
29
  _priority = 1
26
30
  _engineDownload = "hls"
27
31
 
32
+ msg = Prompt()
33
+ console = Console()
34
+
28
35
 
29
36
  def search(string_to_search: str = None, get_onylDatabase: bool = False):
30
37
  """
@@ -38,7 +45,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
38
45
  # Chiedi la scelta all'utente con il bot Telegram
39
46
  string_to_search = bot.ask(
40
47
  "key_search",
41
- f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
48
+ f"Inserisci la parola da cercare\noppure back per tornare alla scelta: ",
42
49
  None
43
50
  )
44
51
 
@@ -3,8 +3,11 @@
3
3
  import os
4
4
 
5
5
 
6
+ # External library
7
+ from rich.console import Console
8
+
9
+
6
10
  # Internal utilities
7
- from StreamingCommunity.Util.console import console
8
11
  from StreamingCommunity.Util.os import os_manager
9
12
  from StreamingCommunity.Util.message import start_message
10
13
  from StreamingCommunity.Lib.Downloader import HLS_Downloader
@@ -20,6 +23,10 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
20
23
  from StreamingCommunity.Api.Player.vixcloud import VideoSource
21
24
 
22
25
 
26
+ # Variable
27
+ console = Console()
28
+
29
+
23
30
  def download_film(select_title: MediaItem) -> str:
24
31
  """
25
32
  Downloads a film using the provided film ID, title name, and domain.
@@ -48,7 +55,7 @@ def download_film(select_title: MediaItem) -> str:
48
55
  console.print(f"[yellow]Download: [red]{select_title.name} \n")
49
56
 
50
57
  # Init class
51
- video_source = VideoSource(site_constant.SITE_NAME, False)
58
+ video_source = VideoSource(site_constant.FULL_URL, False)
52
59
  video_source.setup(select_title.id)
53
60
 
54
61
  # Retrieve scws and if available master playlist
@@ -4,14 +4,18 @@ import os
4
4
  from typing import Tuple
5
5
 
6
6
 
7
+ # External library
8
+ from rich.console import Console
9
+ from rich.prompt import Prompt
10
+
11
+
7
12
  # Internal utilities
8
- from StreamingCommunity.Util.console import console, msg
9
13
  from StreamingCommunity.Util.message import start_message
10
14
  from StreamingCommunity.Lib.Downloader import HLS_Downloader
11
15
  from StreamingCommunity.TelegramHelp.telegram_bot import TelegramSession, get_bot_instance
12
16
 
13
17
  # Logic class
14
- from .util.ScrapeSerie import ScrapeSerie
18
+ from .util.ScrapeSerie import GetSerieInfo
15
19
  from StreamingCommunity.Api.Template.Util import (
16
20
  manage_selection,
17
21
  map_episode_title,
@@ -28,7 +32,12 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
28
32
  from StreamingCommunity.Api.Player.vixcloud import VideoSource
29
33
 
30
34
 
31
- def download_video(index_season_selected: int, index_episode_selected: int, scrape_serie: ScrapeSerie, video_source: VideoSource) -> Tuple[str,bool]:
35
+ # Variable
36
+ msg = Prompt()
37
+ console = Console()
38
+
39
+
40
+ def download_video(index_season_selected: int, index_episode_selected: int, scrape_serie: GetSerieInfo, video_source: VideoSource) -> Tuple[str,bool]:
32
41
  """
33
42
  Download a single episode video.
34
43
 
@@ -85,7 +94,7 @@ def download_video(index_season_selected: int, index_episode_selected: int, scra
85
94
 
86
95
  return r_proc['path'], r_proc['stopped']
87
96
 
88
- def download_episode(index_season_selected: int, scrape_serie: ScrapeSerie, video_source: VideoSource, download_all: bool = False) -> None:
97
+ def download_episode(index_season_selected: int, scrape_serie: GetSerieInfo, video_source: VideoSource, download_all: bool = False) -> None:
89
98
  """
90
99
  Download episodes of a selected season.
91
100
 
@@ -147,8 +156,8 @@ def download_series(select_season: MediaItem) -> None:
147
156
  start_message()
148
157
 
149
158
  # Init class
150
- scrape_serie = ScrapeSerie(site_constant.SITE_NAME)
151
- video_source = VideoSource(site_constant.SITE_NAME, True)
159
+ scrape_serie = GetSerieInfo(site_constant.FULL_URL)
160
+ video_source = VideoSource(site_constant.FULL_URL, True)
152
161
 
153
162
  # Setup video source
154
163
  scrape_serie.setup(select_season.id, select_season.slug)