StreamingCommunity 2.9.9__py3-none-any.whl → 3.0.1__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 (40) hide show
  1. StreamingCommunity/Api/Site/1337xx/__init__.py +1 -2
  2. StreamingCommunity/Api/Site/1337xx/site.py +10 -2
  3. StreamingCommunity/Api/Site/altadefinizione/__init__.py +1 -2
  4. StreamingCommunity/Api/Site/altadefinizione/site.py +6 -1
  5. StreamingCommunity/Api/Site/animeunity/__init__.py +1 -2
  6. StreamingCommunity/Api/Site/animeunity/site.py +63 -35
  7. StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +43 -29
  8. StreamingCommunity/Api/Site/animeworld/__init__.py +1 -2
  9. StreamingCommunity/Api/Site/animeworld/site.py +6 -1
  10. StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +1 -2
  11. StreamingCommunity/Api/Site/ddlstreamitaly/site.py +6 -1
  12. StreamingCommunity/Api/Site/guardaserie/__init__.py +1 -2
  13. StreamingCommunity/Api/Site/guardaserie/site.py +7 -1
  14. StreamingCommunity/Api/Site/raiplay/__init__.py +1 -2
  15. StreamingCommunity/Api/Site/raiplay/film.py +1 -1
  16. StreamingCommunity/Api/Site/raiplay/series.py +1 -1
  17. StreamingCommunity/Api/Site/raiplay/site.py +9 -2
  18. StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +1 -1
  19. StreamingCommunity/Api/Site/streamingcommunity/__init__.py +1 -2
  20. StreamingCommunity/Api/Site/streamingcommunity/site.py +7 -1
  21. StreamingCommunity/Lib/Downloader/HLS/segments.py +7 -15
  22. StreamingCommunity/Lib/Downloader/TOR/downloader.py +7 -14
  23. StreamingCommunity/Lib/FFmpeg/capture.py +1 -5
  24. StreamingCommunity/Lib/FFmpeg/util.py +48 -40
  25. StreamingCommunity/Lib/M3U8/estimator.py +20 -33
  26. StreamingCommunity/Upload/version.py +1 -1
  27. StreamingCommunity/Util/config_json.py +11 -13
  28. StreamingCommunity/Util/ffmpeg_installer.py +26 -1
  29. StreamingCommunity/Util/os.py +13 -15
  30. StreamingCommunity/global_search.py +1 -4
  31. StreamingCommunity/run.py +1 -4
  32. {streamingcommunity-2.9.9.dist-info → streamingcommunity-3.0.1.dist-info}/METADATA +1 -1
  33. {streamingcommunity-2.9.9.dist-info → streamingcommunity-3.0.1.dist-info}/RECORD +37 -40
  34. {streamingcommunity-2.9.9.dist-info → streamingcommunity-3.0.1.dist-info}/WHEEL +1 -1
  35. StreamingCommunity/Api/Site/cb01new/__init__.py +0 -72
  36. StreamingCommunity/Api/Site/cb01new/film.py +0 -62
  37. StreamingCommunity/Api/Site/cb01new/site.py +0 -75
  38. {streamingcommunity-2.9.9.dist-info → streamingcommunity-3.0.1.dist-info}/entry_points.txt +0 -0
  39. {streamingcommunity-2.9.9.dist-info → streamingcommunity-3.0.1.dist-info}/licenses/LICENSE +0 -0
  40. {streamingcommunity-2.9.9.dist-info → streamingcommunity-3.0.1.dist-info}/top_level.txt +0 -0
@@ -1,72 +0,0 @@
1
- # 09.06.24
2
-
3
- from urllib.parse import quote_plus
4
-
5
-
6
- # External library
7
- from rich.console import Console
8
- from rich.prompt import Prompt
9
-
10
-
11
- # Internal utilities
12
- from StreamingCommunity.Api.Template import get_select_title
13
- from StreamingCommunity.Api.Template.config_loader import site_constant
14
- from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
15
-
16
-
17
- # Logic class
18
- from .site import title_search, media_search_manager, table_show_manager
19
- from .film import download_film
20
-
21
-
22
- # Variable
23
- indice = 4
24
- _useFor = "film"
25
- _deprecate = False
26
- _priority = 2
27
- _engineDownload = "mp4"
28
-
29
- msg = Prompt()
30
- console = Console()
31
-
32
-
33
- def process_search_result(select_title):
34
- """
35
- Handles the search result and initiates the download for either a film or series.
36
- """
37
- # !!! ADD TYPE DONT WORK FOR SERIE
38
- download_film(select_title)
39
-
40
- def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_item: dict = None):
41
- """
42
- Main function of the application for search.
43
-
44
- Parameters:
45
- string_to_search (str, optional): String to search for
46
- get_onylDatabase (bool, optional): If True, return only the database object
47
- direct_item (dict, optional): Direct item to process (bypass search)
48
- """
49
- if direct_item:
50
- select_title = MediaItem(**direct_item)
51
- process_search_result(select_title)
52
- return
53
-
54
- if string_to_search is None:
55
- string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{site_constant.SITE_NAME}").strip()
56
-
57
- # Search on database
58
- len_database = title_search(quote_plus(string_to_search))
59
-
60
- ## If only the database is needed, return the manager
61
- if get_onlyDatabase:
62
- return media_search_manager
63
-
64
- if len_database > 0:
65
- select_title = get_select_title(table_show_manager, media_search_manager)
66
- process_search_result(select_title)
67
-
68
- else:
69
-
70
- # If no results are found, ask again
71
- console.print(f"\n[red]Nothing matching was found for[white]: [purple]{string_to_search}")
72
- search()
@@ -1,62 +0,0 @@
1
- # 03.07.24
2
-
3
- import os
4
-
5
-
6
- # External library
7
- from rich.console import Console
8
-
9
-
10
- # Internal utilities
11
- from StreamingCommunity.Util.os import os_manager
12
- from StreamingCommunity.Util.message import start_message
13
- from StreamingCommunity.Lib.Downloader import HLS_Downloader
14
-
15
-
16
- # Logic class
17
- from StreamingCommunity.Api.Template.config_loader import site_constant
18
- from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
19
-
20
-
21
- # Player
22
- from StreamingCommunity.Api.Player.maxstream import VideoSource
23
-
24
-
25
- # Variable
26
- console = Console()
27
-
28
-
29
- def download_film(select_title: MediaItem) -> str:
30
- """
31
- Downloads a film using the provided obj.
32
-
33
- Parameters:
34
- - select_title (MediaItem): The media item to be downloaded. This should be an instance of the MediaItem class, containing attributes like `name` and `url`.
35
-
36
- Return:
37
- - str: output path
38
- """
39
- start_message()
40
- console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [cyan]{select_title.name}[/cyan] \n")
41
-
42
- # Setup api manger
43
- video_source = VideoSource(select_title.url)
44
-
45
- # Define output path
46
- title_name = os_manager.get_sanitize_file(select_title.name) +".mp4"
47
- mp4_path = os.path.join(site_constant.MOVIE_FOLDER, title_name.replace(".mp4", ""))
48
-
49
- # Get m3u8 master playlist
50
- master_playlist = video_source.get_playlist()
51
-
52
- # Download the film using the m3u8 playlist, and output filename
53
- r_proc = HLS_Downloader(
54
- m3u8_url=master_playlist,
55
- output_path=os.path.join(mp4_path, title_name)
56
- ).start()
57
-
58
- if r_proc['error'] is not None:
59
- try: os.remove(r_proc['path'])
60
- except: pass
61
-
62
- return r_proc['path']
@@ -1,75 +0,0 @@
1
- # 03.07.24
2
-
3
- import sys
4
-
5
-
6
- # External libraries
7
- import httpx
8
- from bs4 import BeautifulSoup
9
- from rich.console import Console
10
-
11
-
12
- # Internal utilities
13
- from StreamingCommunity.Util.config_json import config_manager
14
- from StreamingCommunity.Util.headers import get_userAgent
15
- from StreamingCommunity.Util.table import TVShowManager
16
-
17
-
18
- # Logic class
19
- from StreamingCommunity.Api.Template.config_loader import site_constant
20
- from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
21
-
22
-
23
- # Variable
24
- console = Console()
25
- media_search_manager = MediaManager()
26
- table_show_manager = TVShowManager()
27
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
28
-
29
-
30
- def title_search(query: str) -> int:
31
- """
32
- Search for titles based on a search query.
33
-
34
- Parameters:
35
- - query (str): The query to search for.
36
-
37
- Returns:
38
- - int: The number of titles found.
39
- """
40
- media_search_manager.clear()
41
- table_show_manager.clear()
42
-
43
- search_url = f"{site_constant.FULL_URL}/?s={query}"
44
- console.print(f"[cyan]Search url: [yellow]{search_url}")
45
-
46
- try:
47
- response = httpx.get(url=search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
48
- response.raise_for_status()
49
-
50
- except Exception as e:
51
- console.print(f"Site: {site_constant.SITE_NAME}, request search error: {e}")
52
- return 0
53
-
54
- # Create soup and find table
55
- soup = BeautifulSoup(response.text, "html.parser")
56
-
57
- for card in soup.find_all("div", class_=["card", "mp-post", "horizontal"]):
58
- try:
59
- title_tag = card.find("h3", class_="card-title").find("a")
60
- url = title_tag.get("href")
61
- title = title_tag.get_text(strip=True)
62
-
63
- title_info = {
64
- 'name': title,
65
- 'url': url,
66
- 'type': 'film'
67
- }
68
-
69
- media_search_manager.add_media(title_info)
70
-
71
- except Exception as e:
72
- print(f"Error parsing a film entry: {e}")
73
-
74
- # Return the number of titles found
75
- return media_search_manager.get_length()