StreamingCommunity 2.2.0__py3-none-any.whl → 2.4.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/Player/Helper/Vixcloud/util.py +15 -24
- StreamingCommunity/Api/Site/1337xx/site.py +9 -6
- StreamingCommunity/Api/Site/1337xx/title.py +2 -2
- StreamingCommunity/Api/Site/altadefinizionegratis/costant.py +19 -0
- StreamingCommunity/Api/Site/{altadefinizione → altadefinizionegratis}/film.py +2 -2
- StreamingCommunity/Api/Site/{altadefinizione → altadefinizionegratis}/site.py +28 -22
- StreamingCommunity/Api/Site/animeunity/__init__.py +1 -1
- StreamingCommunity/Api/Site/animeunity/costant.py +6 -2
- StreamingCommunity/Api/Site/animeunity/film_serie.py +3 -3
- StreamingCommunity/Api/Site/animeunity/site.py +29 -21
- StreamingCommunity/Api/Site/cb01new/costant.py +6 -2
- StreamingCommunity/Api/Site/cb01new/film.py +2 -2
- StreamingCommunity/Api/Site/cb01new/site.py +20 -13
- StreamingCommunity/Api/Site/ddlstreamitaly/costant.py +6 -2
- StreamingCommunity/Api/Site/ddlstreamitaly/series.py +2 -2
- StreamingCommunity/Api/Site/ddlstreamitaly/site.py +9 -5
- StreamingCommunity/Api/Site/guardaserie/costant.py +6 -2
- StreamingCommunity/Api/Site/guardaserie/series.py +2 -3
- StreamingCommunity/Api/Site/guardaserie/site.py +10 -6
- StreamingCommunity/Api/Site/ilcorsaronero/costant.py +6 -2
- StreamingCommunity/Api/Site/ilcorsaronero/site.py +22 -13
- StreamingCommunity/Api/Site/ilcorsaronero/title.py +3 -3
- StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +1 -1
- StreamingCommunity/Api/Site/mostraguarda/costant.py +6 -2
- StreamingCommunity/Api/Site/mostraguarda/film.py +2 -2
- StreamingCommunity/Api/Site/streamingcommunity/costant.py +7 -3
- StreamingCommunity/Api/Site/streamingcommunity/film.py +3 -3
- StreamingCommunity/Api/Site/streamingcommunity/series.py +3 -3
- StreamingCommunity/Api/Site/streamingcommunity/site.py +30 -26
- StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +24 -24
- StreamingCommunity/Api/Template/Util/get_domain.py +171 -142
- StreamingCommunity/Api/Template/site.py +1 -1
- StreamingCommunity/Lib/Downloader/HLS/downloader.py +14 -3
- StreamingCommunity/Lib/Downloader/HLS/segments.py +36 -22
- StreamingCommunity/Lib/Downloader/TOR/downloader.py +3 -3
- StreamingCommunity/Lib/M3U8/decryptor.py +1 -0
- StreamingCommunity/Lib/M3U8/estimator.py +2 -2
- StreamingCommunity/Lib/M3U8/url_fixer.py +6 -0
- StreamingCommunity/Lib/TMBD/tmdb.py +1 -1
- StreamingCommunity/Upload/version.py +1 -1
- StreamingCommunity/Util/_jsonConfig.py +43 -19
- StreamingCommunity/Util/ffmpeg_installer.py +31 -14
- StreamingCommunity/Util/headers.py +15 -2
- StreamingCommunity/Util/logger.py +9 -0
- StreamingCommunity/Util/os.py +100 -138
- StreamingCommunity/Util/table.py +6 -6
- StreamingCommunity/run.py +61 -7
- {StreamingCommunity-2.2.0.dist-info → StreamingCommunity-2.4.0.dist-info}/METADATA +116 -35
- StreamingCommunity-2.4.0.dist-info/RECORD +92 -0
- StreamingCommunity/Api/Site/altadefinizione/costant.py +0 -15
- StreamingCommunity-2.2.0.dist-info/RECORD +0 -92
- /StreamingCommunity/Api/Site/{altadefinizione → altadefinizionegratis}/__init__.py +0 -0
- {StreamingCommunity-2.2.0.dist-info → StreamingCommunity-2.4.0.dist-info}/LICENSE +0 -0
- {StreamingCommunity-2.2.0.dist-info → StreamingCommunity-2.4.0.dist-info}/WHEEL +0 -0
- {StreamingCommunity-2.2.0.dist-info → StreamingCommunity-2.4.0.dist-info}/entry_points.txt +0 -0
- {StreamingCommunity-2.2.0.dist-info → StreamingCommunity-2.4.0.dist-info}/top_level.txt +0 -0
|
@@ -5,18 +5,14 @@ from typing import Dict, Any, List, Union
|
|
|
5
5
|
|
|
6
6
|
class Episode:
|
|
7
7
|
def __init__(self, data: Dict[str, Any]):
|
|
8
|
-
self.images = None
|
|
9
8
|
self.data = data
|
|
10
9
|
|
|
11
|
-
self.id: int = data.get('id')
|
|
12
|
-
self.scws_id: int = data.get('scws_id')
|
|
13
|
-
self.number: int = data.get('number')
|
|
14
|
-
self.name: str = data.get('name')
|
|
15
|
-
self.plot: str = data.get('plot')
|
|
16
|
-
self.duration: int = data.get('duration')
|
|
17
|
-
|
|
18
|
-
def collect_image(self, SITE_NAME, domain):
|
|
19
|
-
self.image = f"https://cdn.{SITE_NAME}.{domain}/images/{self.data.get('images')[0]['filename']}"
|
|
10
|
+
self.id: int = data.get('id', 0)
|
|
11
|
+
self.scws_id: int = data.get('scws_id', 0)
|
|
12
|
+
self.number: int = data.get('number', 1)
|
|
13
|
+
self.name: str = data.get('name', '')
|
|
14
|
+
self.plot: str = data.get('plot', '')
|
|
15
|
+
self.duration: int = data.get('duration', 0)
|
|
20
16
|
|
|
21
17
|
def __str__(self):
|
|
22
18
|
return f"Episode(id={self.id}, number={self.number}, name='{self.name}', plot='{self.plot}', duration={self.duration} sec)"
|
|
@@ -71,24 +67,19 @@ class EpisodeManager:
|
|
|
71
67
|
|
|
72
68
|
class Season:
|
|
73
69
|
def __init__(self, season_data: Dict[str, Union[int, str, None]]):
|
|
74
|
-
self.images = {}
|
|
75
70
|
self.season_data = season_data
|
|
76
71
|
|
|
77
|
-
self.id: int = season_data.get('id')
|
|
78
|
-
self.scws_id: int = season_data.get('scws_id')
|
|
79
|
-
self.imdb_id: int = season_data.get('imdb_id')
|
|
80
|
-
self.number: int = season_data.get('number')
|
|
81
|
-
self.name: str = season_data.get('name')
|
|
82
|
-
self.slug: str = season_data.get('slug')
|
|
83
|
-
self.plot: str = season_data.get('plot')
|
|
84
|
-
self.type: str = season_data.get('type')
|
|
85
|
-
self.seasons_count: int = season_data.get('seasons_count')
|
|
72
|
+
self.id: int = season_data.get('id', 0)
|
|
73
|
+
self.scws_id: int = season_data.get('scws_id', 0)
|
|
74
|
+
self.imdb_id: int = season_data.get('imdb_id', 0)
|
|
75
|
+
self.number: int = season_data.get('number', 0)
|
|
76
|
+
self.name: str = season_data.get('name', '')
|
|
77
|
+
self.slug: str = season_data.get('slug', '')
|
|
78
|
+
self.plot: str = season_data.get('plot', '')
|
|
79
|
+
self.type: str = season_data.get('type', '')
|
|
80
|
+
self.seasons_count: int = season_data.get('seasons_count', 0)
|
|
86
81
|
self.episodes: EpisodeManager = EpisodeManager()
|
|
87
82
|
|
|
88
|
-
def collect_images(self, SITE_NAME, domain):
|
|
89
|
-
for dict_image in self.season_data.get('images'):
|
|
90
|
-
self.images[dict_image.get('type')] = f"https://cdn.{SITE_NAME}.{domain}/images/{dict_image.get('filename')}"
|
|
91
|
-
|
|
92
83
|
|
|
93
84
|
class Stream:
|
|
94
85
|
def __init__(self, name: str, url: str, active: bool):
|
|
@@ -19,9 +19,11 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
# Variable
|
|
22
|
-
from .costant import SITE_NAME
|
|
22
|
+
from .costant import SITE_NAME, DOMAIN_NOW
|
|
23
23
|
media_search_manager = MediaManager()
|
|
24
24
|
table_show_manager = TVShowManager()
|
|
25
|
+
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
26
|
+
disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
def title_search(word_to_search: str) -> int:
|
|
@@ -38,8 +40,10 @@ def title_search(word_to_search: str) -> int:
|
|
|
38
40
|
table_show_manager.clear()
|
|
39
41
|
|
|
40
42
|
# Find new domain if prev dont work
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
domain_to_use = DOMAIN_NOW
|
|
44
|
+
|
|
45
|
+
if not disable_searchDomain:
|
|
46
|
+
domain_to_use, base_url = search_domain(SITE_NAME, f"https://{SITE_NAME}.{DOMAIN_NOW}")
|
|
43
47
|
|
|
44
48
|
# Construct the full site URL and load the search page
|
|
45
49
|
try:
|
|
@@ -57,7 +61,6 @@ def title_search(word_to_search: str) -> int:
|
|
|
57
61
|
# Create soup and find table
|
|
58
62
|
soup = BeautifulSoup(response.text, "html.parser")
|
|
59
63
|
|
|
60
|
-
# Scrape div film in table on single page
|
|
61
64
|
for tr in soup.find_all('tr'):
|
|
62
65
|
try:
|
|
63
66
|
|
|
@@ -72,8 +75,8 @@ def title_search(word_to_search: str) -> int:
|
|
|
72
75
|
|
|
73
76
|
media_search_manager.add_media(title_info)
|
|
74
77
|
|
|
75
|
-
except:
|
|
76
|
-
|
|
78
|
+
except Exception as e:
|
|
79
|
+
print(f"Error parsing a film entry: {e}")
|
|
77
80
|
|
|
78
81
|
# Return the number of titles found
|
|
79
82
|
return media_search_manager.get_length()
|
|
@@ -21,7 +21,7 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
# Config
|
|
24
|
-
from .costant import
|
|
24
|
+
from .costant import DOMAIN_NOW, SITE_NAME, MOVIE_FOLDER
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def download_title(select_title: MediaItem):
|
|
@@ -39,7 +39,7 @@ def download_title(select_title: MediaItem):
|
|
|
39
39
|
# Define output path
|
|
40
40
|
title_name = os_manager.get_sanitize_file(select_title.name)
|
|
41
41
|
mp4_path = os_manager.get_sanitize_path(
|
|
42
|
-
os.path.join(
|
|
42
|
+
os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
# Create output folder
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# 26.05.24
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# Internal utilities
|
|
7
|
+
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
SITE_NAME = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
|
|
11
|
+
ROOT_PATH = config_manager.get('DEFAULT', 'root_path')
|
|
12
|
+
DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain']
|
|
13
|
+
|
|
14
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
15
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
16
|
+
|
|
17
|
+
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
|
18
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
19
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
@@ -22,7 +22,7 @@ from StreamingCommunity.Api.Player.supervideo import VideoSource
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
# Config
|
|
25
|
-
from .costant import
|
|
25
|
+
from .costant import MOVIE_FOLDER
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def download_film(select_title: MediaItem) -> str:
|
|
@@ -47,7 +47,7 @@ def download_film(select_title: MediaItem) -> str:
|
|
|
47
47
|
# Define output path
|
|
48
48
|
title_name = os_manager.get_sanitize_file(select_title.name) + ".mp4"
|
|
49
49
|
mp4_path = os_manager.get_sanitize_path(
|
|
50
|
-
os.path.join(
|
|
50
|
+
os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
# Get m3u8 master playlist
|
|
@@ -19,9 +19,11 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
# Variable
|
|
22
|
-
from .costant import SITE_NAME
|
|
22
|
+
from .costant import SITE_NAME, DOMAIN_NOW
|
|
23
23
|
media_search_manager = MediaManager()
|
|
24
24
|
table_show_manager = TVShowManager()
|
|
25
|
+
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
26
|
+
disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
def title_search(title_search: str) -> int:
|
|
@@ -38,20 +40,18 @@ def title_search(title_search: str) -> int:
|
|
|
38
40
|
table_show_manager.clear()
|
|
39
41
|
|
|
40
42
|
# Find new domain if prev dont work
|
|
41
|
-
|
|
42
|
-
domain_to_use, _ = search_domain(SITE_NAME, f"https://{SITE_NAME}")
|
|
43
|
+
domain_to_use = DOMAIN_NOW
|
|
43
44
|
|
|
45
|
+
if not disable_searchDomain:
|
|
46
|
+
domain_to_use, base_url = search_domain(SITE_NAME, f"https://{SITE_NAME}.{DOMAIN_NOW}")
|
|
47
|
+
|
|
44
48
|
# Send request to search for title
|
|
45
49
|
client = httpx.Client()
|
|
46
50
|
|
|
47
51
|
try:
|
|
48
52
|
response = client.get(
|
|
49
53
|
url=f"https://{SITE_NAME}.{domain_to_use}/?story={title_search.replace(' ', '+')}&do=search&subaction=search&titleonly=3",
|
|
50
|
-
headers={
|
|
51
|
-
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
|
|
52
|
-
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
|
53
|
-
'User-Agent': get_headers()
|
|
54
|
-
},
|
|
54
|
+
headers={'User-Agent': get_headers()},
|
|
55
55
|
timeout=max_timeout
|
|
56
56
|
)
|
|
57
57
|
response.raise_for_status()
|
|
@@ -62,21 +62,27 @@ def title_search(title_search: str) -> int:
|
|
|
62
62
|
|
|
63
63
|
# Create soup and find table
|
|
64
64
|
soup = BeautifulSoup(response.text, "html.parser")
|
|
65
|
-
table_content = soup.find('div', id="dle-content")
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
'
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
for row in soup.find_all('div', class_='col-lg-3 col-md-3 col-xs-4'):
|
|
67
|
+
try:
|
|
68
|
+
|
|
69
|
+
title_element = row.find('h2', class_='titleFilm').find('a')
|
|
70
|
+
title = title_element.get_text(strip=True)
|
|
71
|
+
link = title_element['href']
|
|
72
|
+
|
|
73
|
+
imdb_element = row.find('div', class_='imdb-rate')
|
|
74
|
+
imdb_rating = imdb_element.get_text(strip=True).split(":")[-1]
|
|
75
|
+
|
|
76
|
+
film_info = {
|
|
77
|
+
'name': title,
|
|
78
|
+
'url': link,
|
|
79
|
+
'score': imdb_rating
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
media_search_manager.add_media(film_info)
|
|
83
|
+
|
|
84
|
+
except AttributeError as e:
|
|
85
|
+
print(f"Error parsing a film entry: {e}")
|
|
80
86
|
|
|
81
87
|
# Return the number of titles found
|
|
82
88
|
return media_search_manager.get_length()
|
|
@@ -27,7 +27,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|
|
27
27
|
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
|
28
28
|
|
|
29
29
|
# Search on database
|
|
30
|
-
len_database = title_search(
|
|
30
|
+
len_database = title_search(string_to_search)
|
|
31
31
|
|
|
32
32
|
# Return list of elements
|
|
33
33
|
if get_onylDatabase:
|
|
@@ -11,5 +11,9 @@ SITE_NAME = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
|
|
|
11
11
|
ROOT_PATH = config_manager.get('DEFAULT', 'root_path')
|
|
12
12
|
DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain']
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
15
|
+
ANIME_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'anime_folder_name'))
|
|
16
|
+
|
|
17
|
+
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
|
18
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
19
|
+
ANIME_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'anime_folder_name'))
|
|
@@ -23,7 +23,7 @@ from StreamingCommunity.Api.Player.vixcloud import VideoSourceAnime
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
# Variable
|
|
26
|
-
from .costant import
|
|
26
|
+
from .costant import SITE_NAME, ANIME_FOLDER, MOVIE_FOLDER
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -54,11 +54,11 @@ def download_episode(index_select: int, scrape_serie: ScrapeSerieAnime, video_so
|
|
|
54
54
|
|
|
55
55
|
if scrape_serie.is_series:
|
|
56
56
|
mp4_path = os_manager.get_sanitize_path(
|
|
57
|
-
os.path.join(
|
|
57
|
+
os.path.join(ANIME_FOLDER, scrape_serie.series_name)
|
|
58
58
|
)
|
|
59
59
|
else:
|
|
60
60
|
mp4_path = os_manager.get_sanitize_path(
|
|
61
|
-
os.path.join(
|
|
61
|
+
os.path.join(MOVIE_FOLDER, scrape_serie.series_name)
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
# Create output folder
|
|
@@ -21,10 +21,11 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
# Variable
|
|
24
|
-
from .costant import SITE_NAME
|
|
24
|
+
from .costant import SITE_NAME, DOMAIN_NOW
|
|
25
25
|
media_search_manager = MediaManager()
|
|
26
26
|
table_show_manager = TVShowManager()
|
|
27
|
-
|
|
27
|
+
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
28
|
+
disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
def get_token(site_name: str, domain: str) -> dict:
|
|
@@ -40,7 +41,10 @@ def get_token(site_name: str, domain: str) -> dict:
|
|
|
40
41
|
"""
|
|
41
42
|
|
|
42
43
|
# Send a GET request to the specified URL composed of the site name and domain
|
|
43
|
-
response = httpx.get(
|
|
44
|
+
response = httpx.get(
|
|
45
|
+
url=f"https://www.{site_name}.{domain}",
|
|
46
|
+
timeout=max_timeout
|
|
47
|
+
)
|
|
44
48
|
response.raise_for_status()
|
|
45
49
|
|
|
46
50
|
# Initialize variables to store CSRF token
|
|
@@ -103,8 +107,10 @@ def title_search(title: str) -> int:
|
|
|
103
107
|
table_show_manager.clear()
|
|
104
108
|
|
|
105
109
|
# Get token and session value from configuration
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
domain_to_use = DOMAIN_NOW
|
|
111
|
+
|
|
112
|
+
if not disable_searchDomain:
|
|
113
|
+
domain_to_use, base_url = search_domain(SITE_NAME, f"https://www.{SITE_NAME}.{DOMAIN_NOW}")
|
|
108
114
|
|
|
109
115
|
data = get_token(SITE_NAME, domain_to_use)
|
|
110
116
|
|
|
@@ -122,8 +128,8 @@ def title_search(title: str) -> int:
|
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
# Prepare JSON data to be sent in the request
|
|
125
|
-
json_data =
|
|
126
|
-
'title': title
|
|
131
|
+
json_data = {
|
|
132
|
+
'title': title
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
# Send a POST request to the API endpoint for live search
|
|
@@ -140,21 +146,23 @@ def title_search(title: str) -> int:
|
|
|
140
146
|
except Exception as e:
|
|
141
147
|
console.print(f"Site: {SITE_NAME}, request search error: {e}")
|
|
142
148
|
|
|
143
|
-
# Process each record returned in the response
|
|
144
149
|
for dict_title in response.json()['records']:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
try:
|
|
151
|
+
|
|
152
|
+
# Rename keys for consistency
|
|
153
|
+
dict_title['name'] = get_real_title(dict_title)
|
|
154
|
+
|
|
155
|
+
media_search_manager.add_media({
|
|
156
|
+
'id': dict_title.get('id'),
|
|
157
|
+
'slug': dict_title.get('slug'),
|
|
158
|
+
'name': dict_title.get('name'),
|
|
159
|
+
'type': dict_title.get('type'),
|
|
160
|
+
'score': dict_title.get('score'),
|
|
161
|
+
'episodes_count': dict_title.get('episodes_count')
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
except Exception as e:
|
|
165
|
+
print(f"Error parsing a film entry: {e}")
|
|
158
166
|
|
|
159
167
|
# Return the length of media search manager
|
|
160
168
|
return media_search_manager.get_length()
|
|
@@ -11,5 +11,9 @@ SITE_NAME = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
|
|
|
11
11
|
ROOT_PATH = config_manager.get('DEFAULT', 'root_path')
|
|
12
12
|
DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain']
|
|
13
13
|
|
|
14
|
-
SERIES_FOLDER = config_manager.get('DEFAULT', 'serie_folder_name')
|
|
15
|
-
MOVIE_FOLDER = config_manager.get('DEFAULT', 'movie_folder_name')
|
|
14
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
15
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
16
|
+
|
|
17
|
+
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
|
18
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
19
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
@@ -21,7 +21,7 @@ from StreamingCommunity.Api.Player.maxstream import VideoSource
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
# Config
|
|
24
|
-
from .costant import
|
|
24
|
+
from .costant import MOVIE_FOLDER
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def download_film(select_title: MediaItem) -> str:
|
|
@@ -46,7 +46,7 @@ def download_film(select_title: MediaItem) -> str:
|
|
|
46
46
|
# Define output path
|
|
47
47
|
title_name = os_manager.get_sanitize_file(select_title.name) +".mp4"
|
|
48
48
|
mp4_path = os_manager.get_sanitize_path(
|
|
49
|
-
os.path.join(
|
|
49
|
+
os.path.join(MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
# Get m3u8 master playlist
|
|
@@ -18,9 +18,11 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
# Variable
|
|
21
|
-
from .costant import SITE_NAME
|
|
21
|
+
from .costant import SITE_NAME, DOMAIN_NOW
|
|
22
22
|
media_search_manager = MediaManager()
|
|
23
23
|
table_show_manager = TVShowManager()
|
|
24
|
+
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
25
|
+
disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
def title_search(word_to_search: str) -> int:
|
|
@@ -37,8 +39,10 @@ def title_search(word_to_search: str) -> int:
|
|
|
37
39
|
table_show_manager.clear()
|
|
38
40
|
|
|
39
41
|
# Find new domain if prev dont work
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
domain_to_use = DOMAIN_NOW
|
|
43
|
+
|
|
44
|
+
if not disable_searchDomain:
|
|
45
|
+
domain_to_use, base_url = search_domain(SITE_NAME, f"https://{SITE_NAME}.{DOMAIN_NOW}")
|
|
42
46
|
|
|
43
47
|
response = httpx.get(
|
|
44
48
|
url=f"https://{SITE_NAME}.{domain_to_use}/?s={word_to_search}",
|
|
@@ -50,20 +54,23 @@ def title_search(word_to_search: str) -> int:
|
|
|
50
54
|
# Create soup and find table
|
|
51
55
|
soup = BeautifulSoup(response.text, "html.parser")
|
|
52
56
|
|
|
53
|
-
# For all element in table
|
|
54
57
|
for div in soup.find_all("div", class_ = "card-content"):
|
|
58
|
+
try:
|
|
55
59
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
url = div.find("h3").find("a").get("href")
|
|
61
|
+
title = div.find("h3").find("a").get_text(strip=True)
|
|
62
|
+
desc = div.find("p").find("strong").text
|
|
59
63
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
title_info = {
|
|
65
|
+
'name': title,
|
|
66
|
+
'desc': desc,
|
|
67
|
+
'url': url
|
|
68
|
+
}
|
|
65
69
|
|
|
66
|
-
|
|
70
|
+
media_search_manager.add_media(title_info)
|
|
71
|
+
|
|
72
|
+
except Exception as e:
|
|
73
|
+
print(f"Error parsing a film entry: {e}")
|
|
67
74
|
|
|
68
75
|
# Return the number of titles found
|
|
69
76
|
return media_search_manager.get_length()
|
|
@@ -12,5 +12,9 @@ ROOT_PATH = config_manager.get('DEFAULT', 'root_path')
|
|
|
12
12
|
DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain']
|
|
13
13
|
COOKIE = config_manager.get_dict('SITE', SITE_NAME)['extra']
|
|
14
14
|
|
|
15
|
-
SERIES_FOLDER = config_manager.get('DEFAULT', 'serie_folder_name')
|
|
16
|
-
MOVIE_FOLDER = config_manager.get('DEFAULT', 'movie_folder_name')
|
|
15
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
16
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
17
|
+
|
|
18
|
+
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
|
19
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
20
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
@@ -24,7 +24,7 @@ from StreamingCommunity.Api.Player.ddl import VideoSource
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
# Variable
|
|
27
|
-
from .costant import
|
|
27
|
+
from .costant import SERIES_FOLDER
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -51,7 +51,7 @@ def download_video(index_episode_selected: int, scape_info_serie: GetSerieInfo,
|
|
|
51
51
|
title_name = os_manager.get_sanitize_file(
|
|
52
52
|
f"{map_episode_title(scape_info_serie.tv_name, None, index_episode_selected, obj_episode.get('name'))}.mp4"
|
|
53
53
|
)
|
|
54
|
-
mp4_path = os.path.join(
|
|
54
|
+
mp4_path = os.path.join(SERIES_FOLDER, scape_info_serie.tv_name)
|
|
55
55
|
|
|
56
56
|
# Create output folder
|
|
57
57
|
os_manager.create_path(mp4_path)
|
|
@@ -22,9 +22,11 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
# Variable
|
|
25
|
-
from .costant import SITE_NAME
|
|
25
|
+
from .costant import SITE_NAME, DOMAIN_NOW
|
|
26
26
|
media_search_manager = MediaManager()
|
|
27
27
|
table_show_manager = TVShowManager()
|
|
28
|
+
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
29
|
+
disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
def title_search(word_to_search: str) -> int:
|
|
@@ -41,8 +43,10 @@ def title_search(word_to_search: str) -> int:
|
|
|
41
43
|
table_show_manager.clear()
|
|
42
44
|
|
|
43
45
|
# Find new domain if prev dont work
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
domain_to_use = DOMAIN_NOW
|
|
47
|
+
|
|
48
|
+
if not disable_searchDomain:
|
|
49
|
+
domain_to_use, base_url = search_domain(SITE_NAME, f"https://{SITE_NAME}.{DOMAIN_NOW}")
|
|
46
50
|
|
|
47
51
|
# Send request to search for titles
|
|
48
52
|
try:
|
|
@@ -75,9 +79,9 @@ def title_search(word_to_search: str) -> int:
|
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
media_search_manager.add_media(title_info)
|
|
78
|
-
|
|
82
|
+
|
|
79
83
|
except Exception as e:
|
|
80
|
-
|
|
84
|
+
print(f"Error parsing a film entry: {e}")
|
|
81
85
|
|
|
82
86
|
return media_search_manager.get_length()
|
|
83
87
|
|
|
@@ -11,5 +11,9 @@ SITE_NAME = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
|
|
|
11
11
|
ROOT_PATH = config_manager.get('DEFAULT', 'root_path')
|
|
12
12
|
DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain']
|
|
13
13
|
|
|
14
|
-
SERIES_FOLDER = config_manager.get('DEFAULT', 'serie_folder_name')
|
|
15
|
-
MOVIE_FOLDER = config_manager.get('DEFAULT', 'movie_folder_name')
|
|
14
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
15
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
16
|
+
|
|
17
|
+
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
|
18
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
19
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
|
-
import time
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
# Internal utilities
|
|
@@ -24,7 +23,7 @@ from StreamingCommunity.Api.Player.supervideo import VideoSource
|
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
# Variable
|
|
27
|
-
from .costant import
|
|
26
|
+
from .costant import SERIES_FOLDER
|
|
28
27
|
|
|
29
28
|
|
|
30
29
|
|
|
@@ -50,7 +49,7 @@ def download_video(index_season_selected: int, index_episode_selected: int, scap
|
|
|
50
49
|
|
|
51
50
|
# Define filename and path for the downloaded video
|
|
52
51
|
mp4_name = f"{map_episode_title(scape_info_serie.tv_name, index_season_selected, index_episode_selected, obj_episode.get('name'))}.mp4"
|
|
53
|
-
mp4_path = os.path.join(
|
|
52
|
+
mp4_path = os.path.join(SERIES_FOLDER, scape_info_serie.tv_name, f"S{index_season_selected}")
|
|
54
53
|
|
|
55
54
|
# Setup video source
|
|
56
55
|
video_source = VideoSource(obj_episode.get('url'))
|
|
@@ -19,9 +19,11 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
# Variable
|
|
22
|
-
from .costant import SITE_NAME
|
|
22
|
+
from .costant import SITE_NAME, DOMAIN_NOW
|
|
23
23
|
media_search_manager = MediaManager()
|
|
24
24
|
table_show_manager = TVShowManager()
|
|
25
|
+
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
26
|
+
disable_searchDomain = config_manager.get_bool("DEFAULT", "disable_searchDomain")
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
def title_search(word_to_search: str) -> int:
|
|
@@ -38,8 +40,10 @@ def title_search(word_to_search: str) -> int:
|
|
|
38
40
|
table_show_manager.clear()
|
|
39
41
|
|
|
40
42
|
# Find new domain if prev dont work
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
domain_to_use = DOMAIN_NOW
|
|
44
|
+
|
|
45
|
+
if not disable_searchDomain:
|
|
46
|
+
domain_to_use, base_url = search_domain(SITE_NAME, f"https://{SITE_NAME}.{DOMAIN_NOW}")
|
|
43
47
|
|
|
44
48
|
# Send request to search for titles
|
|
45
49
|
try:
|
|
@@ -58,8 +62,8 @@ def title_search(word_to_search: str) -> int:
|
|
|
58
62
|
table_content = soup.find('div', class_="mlnew-list")
|
|
59
63
|
|
|
60
64
|
for serie_div in table_content.find_all('div', class_='mlnew'):
|
|
61
|
-
|
|
62
65
|
try:
|
|
66
|
+
|
|
63
67
|
title = serie_div.find('div', class_='mlnh-2').find("h2").get_text(strip=True)
|
|
64
68
|
link = serie_div.find('div', class_='mlnh-2').find('a')['href']
|
|
65
69
|
imdb_rating = serie_div.find('span', class_='mlnh-imdb').get_text(strip=True)
|
|
@@ -72,8 +76,8 @@ def title_search(word_to_search: str) -> int:
|
|
|
72
76
|
|
|
73
77
|
media_search_manager.add_media(serie_info)
|
|
74
78
|
|
|
75
|
-
except:
|
|
76
|
-
|
|
79
|
+
except Exception as e:
|
|
80
|
+
print(f"Error parsing a film entry: {e}")
|
|
77
81
|
|
|
78
82
|
# Return the number of titles found
|
|
79
83
|
return media_search_manager.get_length()
|
|
@@ -11,5 +11,9 @@ SITE_NAME = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
|
|
|
11
11
|
ROOT_PATH = config_manager.get('DEFAULT', 'root_path')
|
|
12
12
|
DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain']
|
|
13
13
|
|
|
14
|
-
SERIES_FOLDER = config_manager.get('DEFAULT', 'serie_folder_name')
|
|
15
|
-
MOVIE_FOLDER = config_manager.get('DEFAULT', 'movie_folder_name')
|
|
14
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
15
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_folder_name'))
|
|
16
|
+
|
|
17
|
+
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
|
18
|
+
SERIES_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'serie_folder_name'))
|
|
19
|
+
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|