StreamingCommunity 3.2.9__py3-none-any.whl → 3.3.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.
- StreamingCommunity/Api/Site/altadefinizione/__init__.py +31 -14
- StreamingCommunity/Api/Site/animeunity/__init__.py +30 -14
- StreamingCommunity/Api/Site/animeworld/__init__.py +33 -7
- StreamingCommunity/Api/Site/crunchyroll/__init__.py +43 -9
- StreamingCommunity/Api/Site/crunchyroll/site.py +7 -1
- StreamingCommunity/Api/Site/guardaserie/__init__.py +36 -10
- StreamingCommunity/Api/Site/mediasetinfinity/__init__.py +36 -11
- StreamingCommunity/Api/Site/mediasetinfinity/site.py +8 -1
- StreamingCommunity/Api/Site/raiplay/__init__.py +46 -11
- StreamingCommunity/Api/Site/raiplay/film.py +2 -1
- StreamingCommunity/Api/Site/raiplay/series.py +12 -2
- StreamingCommunity/Api/Site/streamingcommunity/__init__.py +5 -7
- StreamingCommunity/Api/Site/streamingcommunity/site.py +4 -1
- StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +5 -2
- StreamingCommunity/Api/Site/streamingwatch/__init__.py +43 -9
- StreamingCommunity/Lib/Downloader/DASH/cdm_helpher.py +8 -0
- StreamingCommunity/Lib/Downloader/DASH/downloader.py +23 -21
- StreamingCommunity/Lib/Downloader/MP4/downloader.py +21 -3
- StreamingCommunity/Upload/update.py +2 -2
- StreamingCommunity/Upload/version.py +2 -2
- StreamingCommunity/Util/os.py +4 -1
- StreamingCommunity/run.py +4 -4
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/METADATA +5 -1
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/RECORD +28 -31
- StreamingCommunity/Api/Site/cb01new/__init__.py +0 -72
- StreamingCommunity/Api/Site/cb01new/film.py +0 -64
- StreamingCommunity/Api/Site/cb01new/site.py +0 -78
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/WHEEL +0 -0
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/entry_points.txt +0 -0
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/licenses/LICENSE +0 -0
- {streamingcommunity-3.2.9.dist-info → streamingcommunity-3.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,64 +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
|
-
|
|
14
|
-
|
|
15
|
-
# Logic class
|
|
16
|
-
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
17
|
-
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# Player
|
|
21
|
-
from StreamingCommunity import HLS_Downloader
|
|
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
|
-
hls_process = HLS_Downloader(
|
|
54
|
-
m3u8_url=master_playlist,
|
|
55
|
-
output_path=os.path.join(mp4_path, title_name)
|
|
56
|
-
).start()
|
|
57
|
-
|
|
58
|
-
if hls_process['error'] is not None:
|
|
59
|
-
try:
|
|
60
|
-
os.remove(hls_process['path'])
|
|
61
|
-
except Exception:
|
|
62
|
-
pass
|
|
63
|
-
|
|
64
|
-
return hls_process['path']
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# 03.07.24
|
|
2
|
-
|
|
3
|
-
# External libraries
|
|
4
|
-
import httpx
|
|
5
|
-
from bs4 import BeautifulSoup
|
|
6
|
-
from rich.console import Console
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# Internal utilities
|
|
10
|
-
from StreamingCommunity.Util.config_json import config_manager
|
|
11
|
-
from StreamingCommunity.Util.headers import get_userAgent
|
|
12
|
-
from StreamingCommunity.Util.table import TVShowManager
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
# Logic class
|
|
16
|
-
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
17
|
-
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# Variable
|
|
21
|
-
console = Console()
|
|
22
|
-
media_search_manager = MediaManager()
|
|
23
|
-
table_show_manager = TVShowManager()
|
|
24
|
-
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def title_search(query: str) -> int:
|
|
28
|
-
"""
|
|
29
|
-
Search for titles based on a search query.
|
|
30
|
-
|
|
31
|
-
Parameters:
|
|
32
|
-
- query (str): The query to search for.
|
|
33
|
-
|
|
34
|
-
Returns:
|
|
35
|
-
- int: The number of titles found.
|
|
36
|
-
"""
|
|
37
|
-
media_search_manager.clear()
|
|
38
|
-
table_show_manager.clear()
|
|
39
|
-
|
|
40
|
-
search_url = f"{site_constant.FULL_URL}/?s={query}"
|
|
41
|
-
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
42
|
-
|
|
43
|
-
try:
|
|
44
|
-
response = httpx.get(
|
|
45
|
-
search_url,
|
|
46
|
-
headers={'user-agent': get_userAgent()},
|
|
47
|
-
timeout=max_timeout,
|
|
48
|
-
follow_redirects=True,
|
|
49
|
-
verify=False
|
|
50
|
-
)
|
|
51
|
-
response.raise_for_status()
|
|
52
|
-
|
|
53
|
-
except Exception as e:
|
|
54
|
-
console.print(f"Site: {site_constant.SITE_NAME}, request search error: {e}")
|
|
55
|
-
return 0
|
|
56
|
-
|
|
57
|
-
# Create soup and find table
|
|
58
|
-
soup = BeautifulSoup(response.text, "html.parser")
|
|
59
|
-
|
|
60
|
-
for card in soup.find_all("div", class_=["card", "mp-post", "horizontal"]):
|
|
61
|
-
try:
|
|
62
|
-
title_tag = card.find("h3", class_="card-title").find("a")
|
|
63
|
-
url = title_tag.get("href")
|
|
64
|
-
title = title_tag.get_text(strip=True)
|
|
65
|
-
|
|
66
|
-
title_info = {
|
|
67
|
-
'name': title,
|
|
68
|
-
'url': url,
|
|
69
|
-
'type': 'film'
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
media_search_manager.add_media(title_info)
|
|
73
|
-
|
|
74
|
-
except Exception as e:
|
|
75
|
-
print(f"Error parsing a film entry: {e}")
|
|
76
|
-
|
|
77
|
-
# Return the number of titles found
|
|
78
|
-
return media_search_manager.get_length()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|