StreamingCommunity 2.6.1__py3-none-any.whl → 2.7.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/ddl.py +2 -2
- StreamingCommunity/Api/Player/maxstream.py +3 -3
- StreamingCommunity/Api/Player/supervideo.py +2 -2
- StreamingCommunity/Api/Player/vixcloud.py +16 -18
- StreamingCommunity/Api/Site/1337xx/site.py +11 -4
- StreamingCommunity/Api/Site/1337xx/title.py +3 -4
- StreamingCommunity/Api/Site/animeunity/film_serie.py +5 -4
- StreamingCommunity/Api/Site/animeunity/site.py +9 -3
- StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +8 -9
- StreamingCommunity/Api/Site/cb01new/site.py +12 -4
- StreamingCommunity/Api/Site/ddlstreamitaly/site.py +10 -4
- StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +2 -2
- StreamingCommunity/Api/Site/guardaserie/site.py +17 -11
- StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +4 -3
- StreamingCommunity/Api/Site/mostraguarda/film.py +3 -3
- StreamingCommunity/Api/Site/streamingcommunity/film.py +1 -1
- StreamingCommunity/Api/Site/streamingcommunity/series.py +2 -2
- StreamingCommunity/Api/Site/streamingcommunity/site.py +11 -4
- StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +8 -9
- StreamingCommunity/Api/Template/Util/get_domain.py +11 -72
- StreamingCommunity/Api/Template/config_loader.py +6 -2
- StreamingCommunity/Lib/Downloader/HLS/downloader.py +2 -2
- StreamingCommunity/Lib/Downloader/HLS/proxyes.py +2 -2
- StreamingCommunity/Lib/Downloader/HLS/segments.py +5 -5
- StreamingCommunity/Lib/Downloader/MP4/downloader.py +2 -2
- StreamingCommunity/Upload/update.py +3 -3
- StreamingCommunity/Upload/version.py +1 -1
- StreamingCommunity/Util/_jsonConfig.py +198 -98
- StreamingCommunity/Util/headers.py +8 -1
- StreamingCommunity/run.py +13 -9
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.7.0.dist-info}/METADATA +39 -23
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.7.0.dist-info}/RECORD +36 -40
- StreamingCommunity/Api/Site/ilcorsaronero/__init__.py +0 -53
- StreamingCommunity/Api/Site/ilcorsaronero/site.py +0 -64
- StreamingCommunity/Api/Site/ilcorsaronero/title.py +0 -42
- StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +0 -149
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.7.0.dist-info}/LICENSE +0 -0
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.7.0.dist-info}/WHEEL +0 -0
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.7.0.dist-info}/entry_points.txt +0 -0
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.7.0.dist-info}/top_level.txt +0 -0
|
@@ -10,7 +10,7 @@ from bs4 import BeautifulSoup
|
|
|
10
10
|
|
|
11
11
|
# Internal utilities
|
|
12
12
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
13
|
-
from StreamingCommunity.Util.headers import
|
|
13
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
# Variable
|
|
@@ -22,7 +22,7 @@ class VideoSource:
|
|
|
22
22
|
"""
|
|
23
23
|
Initializes the VideoSource object with default values.
|
|
24
24
|
"""
|
|
25
|
-
self.headers = {'user-agent':
|
|
25
|
+
self.headers = {'user-agent': get_userAgent()}
|
|
26
26
|
self.cookie = cookie
|
|
27
27
|
|
|
28
28
|
def setup(self, url: str) -> None:
|
|
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
|
|
|
12
12
|
|
|
13
13
|
# Internal utilities
|
|
14
14
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
15
|
-
from StreamingCommunity.Util.headers import
|
|
15
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
# Variable
|
|
@@ -31,7 +31,7 @@ class VideoSource:
|
|
|
31
31
|
self.redirect_url = None
|
|
32
32
|
self.maxstream_url = None
|
|
33
33
|
self.m3u8_url = None
|
|
34
|
-
self.headers = {'user-agent':
|
|
34
|
+
self.headers = {'user-agent': get_userAgent()}
|
|
35
35
|
|
|
36
36
|
def get_redirect_url(self):
|
|
37
37
|
"""
|
|
@@ -78,7 +78,7 @@ class VideoSource:
|
|
|
78
78
|
logging.warning("Anchor tag not found. Trying the alternative method.")
|
|
79
79
|
headers = {
|
|
80
80
|
'origin': 'https://stayonline.pro',
|
|
81
|
-
'user-agent':
|
|
81
|
+
'user-agent': get_userAgent(),
|
|
82
82
|
'x-requested-with': 'XMLHttpRequest',
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
|
|
|
12
12
|
|
|
13
13
|
# Internal utilities
|
|
14
14
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
15
|
-
from StreamingCommunity.Util.headers import
|
|
15
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
# Variable
|
|
@@ -30,7 +30,7 @@ class VideoSource:
|
|
|
30
30
|
self.headers = {
|
|
31
31
|
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
|
|
32
32
|
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
|
33
|
-
'User-Agent':
|
|
33
|
+
'User-Agent': get_userAgent()
|
|
34
34
|
}
|
|
35
35
|
self.client = httpx.Client()
|
|
36
36
|
self.url = url
|
|
@@ -11,7 +11,7 @@ from bs4 import BeautifulSoup
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
# Internal utilities
|
|
14
|
-
from StreamingCommunity.Util.headers import
|
|
14
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
15
15
|
from StreamingCommunity.Util.console import console
|
|
16
16
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
17
17
|
from .Helper.Vixcloud.util import WindowVideo, WindowParameter, StreamsCollection
|
|
@@ -23,17 +23,16 @@ max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class VideoSource:
|
|
26
|
-
def __init__(self,
|
|
26
|
+
def __init__(self, url: str, is_series: bool):
|
|
27
27
|
"""
|
|
28
28
|
Initialize video source for streaming site.
|
|
29
29
|
|
|
30
30
|
Args:
|
|
31
|
-
|
|
32
|
-
is_series (bool): Flag for series or movie content
|
|
31
|
+
- url (str): The URL of the streaming site.
|
|
32
|
+
- is_series (bool): Flag for series or movie content
|
|
33
33
|
"""
|
|
34
|
-
self.headers = {'user-agent':
|
|
35
|
-
self.
|
|
36
|
-
self.domain = config_manager.get_dict('SITE', self.base_name)['domain']
|
|
34
|
+
self.headers = {'user-agent': get_userAgent()}
|
|
35
|
+
self.url = url
|
|
37
36
|
self.is_series = is_series
|
|
38
37
|
|
|
39
38
|
def setup(self, media_id: int):
|
|
@@ -64,7 +63,7 @@ class VideoSource:
|
|
|
64
63
|
|
|
65
64
|
# Make a request to get iframe source
|
|
66
65
|
response = httpx.get(
|
|
67
|
-
url=f"
|
|
66
|
+
url=f"{self.url}/iframe/{self.media_id}",
|
|
68
67
|
params=params,
|
|
69
68
|
timeout=max_timeout
|
|
70
69
|
)
|
|
@@ -181,11 +180,11 @@ class VideoSource:
|
|
|
181
180
|
"""
|
|
182
181
|
headers = {
|
|
183
182
|
'referer': url_to_download,
|
|
184
|
-
'user-agent':
|
|
183
|
+
'user-agent': get_userAgent(),
|
|
185
184
|
}
|
|
186
185
|
|
|
187
186
|
# API request to get video details
|
|
188
|
-
video_api_url = f'
|
|
187
|
+
video_api_url = f'{self.url}/api/video/{scws_id}'
|
|
189
188
|
response = httpx.get(video_api_url, headers=headers)
|
|
190
189
|
|
|
191
190
|
if response.status_code == 200:
|
|
@@ -197,10 +196,10 @@ class VideoSource:
|
|
|
197
196
|
|
|
198
197
|
# Request download link generation for each track
|
|
199
198
|
download_response = httpx.post(
|
|
200
|
-
url=f'
|
|
199
|
+
url=f'{self.url}/api/download/generate_link?scws_id={track["video_id"]}&rendition={track["quality"]}',
|
|
201
200
|
headers={
|
|
202
201
|
'referer': url_to_download,
|
|
203
|
-
'user-agent':
|
|
202
|
+
'user-agent': get_userAgent(),
|
|
204
203
|
'x-xsrf-token': config_manager.get("SITE", self.base_name)['extra']['x-xsrf-token']
|
|
205
204
|
},
|
|
206
205
|
cookies={
|
|
@@ -220,18 +219,17 @@ class VideoSource:
|
|
|
220
219
|
|
|
221
220
|
|
|
222
221
|
class VideoSourceAnime(VideoSource):
|
|
223
|
-
def __init__(self,
|
|
222
|
+
def __init__(self, url: str):
|
|
224
223
|
"""
|
|
225
224
|
Initialize anime-specific video source.
|
|
226
225
|
|
|
227
226
|
Args:
|
|
228
|
-
|
|
227
|
+
- url (str): The URL of the streaming site.
|
|
229
228
|
|
|
230
229
|
Extends base VideoSource with anime-specific initialization
|
|
231
230
|
"""
|
|
232
|
-
self.headers = {'user-agent':
|
|
233
|
-
self.
|
|
234
|
-
self.domain = config_manager.get_dict('SITE', self.base_name)['domain']
|
|
231
|
+
self.headers = {'user-agent': get_userAgent()}
|
|
232
|
+
self.url = url
|
|
235
233
|
self.src_mp4 = None
|
|
236
234
|
|
|
237
235
|
def get_embed(self, episode_id: int):
|
|
@@ -247,7 +245,7 @@ class VideoSourceAnime(VideoSource):
|
|
|
247
245
|
try:
|
|
248
246
|
|
|
249
247
|
response = httpx.get(
|
|
250
|
-
url=f"
|
|
248
|
+
url=f"{self.url}/embed-url/{episode_id}",
|
|
251
249
|
headers=self.headers,
|
|
252
250
|
timeout=max_timeout
|
|
253
251
|
)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# 02.07.24
|
|
2
2
|
|
|
3
|
+
import sys
|
|
4
|
+
|
|
3
5
|
# External libraries
|
|
4
6
|
import httpx
|
|
5
7
|
from bs4 import BeautifulSoup
|
|
@@ -8,7 +10,7 @@ from bs4 import BeautifulSoup
|
|
|
8
10
|
# Internal utilities
|
|
9
11
|
from StreamingCommunity.Util.console import console
|
|
10
12
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
11
|
-
from StreamingCommunity.Util.headers import
|
|
13
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
12
14
|
from StreamingCommunity.Util.table import TVShowManager
|
|
13
15
|
|
|
14
16
|
|
|
@@ -42,13 +44,18 @@ def title_search(word_to_search: str) -> int:
|
|
|
42
44
|
domain_to_use = site_constant.DOMAIN_NOW
|
|
43
45
|
|
|
44
46
|
if not disable_searchDomain:
|
|
45
|
-
domain_to_use, base_url = search_domain(site_constant.SITE_NAME,
|
|
47
|
+
domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
|
|
48
|
+
|
|
49
|
+
if domain_to_use is None or base_url is None:
|
|
50
|
+
console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
|
|
51
|
+
console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
|
|
52
|
+
sys.exit(1)
|
|
46
53
|
|
|
47
54
|
# Construct the full site URL and load the search page
|
|
48
55
|
try:
|
|
49
56
|
response = httpx.get(
|
|
50
|
-
url=f"
|
|
51
|
-
headers={'user-agent':
|
|
57
|
+
url=f"{site_constant.FULL_URL}/search/{word_to_search}/1/",
|
|
58
|
+
headers={'user-agent': get_userAgent()},
|
|
52
59
|
follow_redirects=True,
|
|
53
60
|
timeout=max_timeout
|
|
54
61
|
)
|
|
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
|
|
|
12
12
|
from StreamingCommunity.Util.console import console
|
|
13
13
|
from StreamingCommunity.Util.os import os_manager
|
|
14
14
|
from StreamingCommunity.Util.message import start_message
|
|
15
|
-
from StreamingCommunity.Util.headers import
|
|
15
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
16
16
|
from StreamingCommunity.Lib.Downloader import TOR_downloader
|
|
17
17
|
|
|
18
18
|
|
|
@@ -41,11 +41,10 @@ def download_title(select_title: MediaItem):
|
|
|
41
41
|
os_manager.create_path(mp4_path)
|
|
42
42
|
|
|
43
43
|
# Make request to page with magnet
|
|
44
|
-
full_site_name = f"{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}"
|
|
45
44
|
response = httpx.get(
|
|
46
|
-
url="
|
|
45
|
+
url=f"{site_constant.FULL_URL}{select_title.url}",
|
|
47
46
|
headers={
|
|
48
|
-
'user-agent':
|
|
47
|
+
'user-agent': get_userAgent()
|
|
49
48
|
},
|
|
50
49
|
follow_redirects=True
|
|
51
50
|
)
|
|
@@ -85,6 +85,7 @@ def download_episode(index_select: int, scrape_serie: ScrapeSerieAnime, video_so
|
|
|
85
85
|
|
|
86
86
|
else:
|
|
87
87
|
logging.error(f"Skip index: {index_select} cant find info with api.")
|
|
88
|
+
return None, True
|
|
88
89
|
|
|
89
90
|
|
|
90
91
|
def download_series(select_title: MediaItem):
|
|
@@ -100,8 +101,8 @@ def download_series(select_title: MediaItem):
|
|
|
100
101
|
if site_constant.TELEGRAM_BOT:
|
|
101
102
|
bot = get_bot_instance()
|
|
102
103
|
|
|
103
|
-
scrape_serie = ScrapeSerieAnime(site_constant.
|
|
104
|
-
video_source = VideoSourceAnime(site_constant.
|
|
104
|
+
scrape_serie = ScrapeSerieAnime(site_constant.FULL_URL)
|
|
105
|
+
video_source = VideoSourceAnime(site_constant.FULL_URL)
|
|
105
106
|
|
|
106
107
|
# Set up video source
|
|
107
108
|
scrape_serie.setup(None, select_title.id, select_title.slug)
|
|
@@ -160,8 +161,8 @@ def download_film(select_title: MediaItem):
|
|
|
160
161
|
"""
|
|
161
162
|
|
|
162
163
|
# Init class
|
|
163
|
-
scrape_serie = ScrapeSerieAnime(site_constant.
|
|
164
|
-
video_source = VideoSourceAnime(site_constant.
|
|
164
|
+
scrape_serie = ScrapeSerieAnime(site_constant.FULL_URL)
|
|
165
|
+
video_source = VideoSourceAnime(site_constant.FULL_URL)
|
|
165
166
|
|
|
166
167
|
# Set up video source
|
|
167
168
|
scrape_serie.setup(None, select_title.id, select_title.slug)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# 10.12.23
|
|
2
2
|
|
|
3
|
+
import sys
|
|
3
4
|
import logging
|
|
4
5
|
|
|
5
6
|
|
|
@@ -42,7 +43,7 @@ def get_token(site_name: str, domain: str) -> dict:
|
|
|
42
43
|
|
|
43
44
|
# Send a GET request to the specified URL composed of the site name and domain
|
|
44
45
|
response = httpx.get(
|
|
45
|
-
url=
|
|
46
|
+
url=site_constant.FULL_URL,
|
|
46
47
|
timeout=max_timeout
|
|
47
48
|
)
|
|
48
49
|
response.raise_for_status()
|
|
@@ -113,7 +114,12 @@ def title_search(title: str) -> int:
|
|
|
113
114
|
domain_to_use = site_constant.DOMAIN_NOW
|
|
114
115
|
|
|
115
116
|
if not disable_searchDomain:
|
|
116
|
-
domain_to_use, base_url = search_domain(site_constant.SITE_NAME,
|
|
117
|
+
domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
|
|
118
|
+
|
|
119
|
+
if domain_to_use is None or base_url is None:
|
|
120
|
+
console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
|
|
121
|
+
console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
|
|
122
|
+
sys.exit(1)
|
|
117
123
|
|
|
118
124
|
data = get_token(site_constant.SITE_NAME, domain_to_use)
|
|
119
125
|
|
|
@@ -138,7 +144,7 @@ def title_search(title: str) -> int:
|
|
|
138
144
|
# Send a POST request to the API endpoint for live search
|
|
139
145
|
try:
|
|
140
146
|
response = httpx.post(
|
|
141
|
-
url=f'
|
|
147
|
+
url=f'{site_constant.FULL_URL}/livesearch',
|
|
142
148
|
cookies=cookies,
|
|
143
149
|
headers=headers,
|
|
144
150
|
json=json_data,
|
|
@@ -8,7 +8,7 @@ import httpx
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
# Internal utilities
|
|
11
|
-
from StreamingCommunity.Util.headers import
|
|
11
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
12
12
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
13
13
|
from StreamingCommunity.Api.Player.Helper.Vixcloud.util import EpisodeManager, Episode
|
|
14
14
|
|
|
@@ -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,
|
|
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
|
-
|
|
27
|
+
url (str): Url of the streaming site
|
|
28
28
|
"""
|
|
29
29
|
self.is_series = False
|
|
30
|
-
self.headers = {'user-agent':
|
|
31
|
-
self.
|
|
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"
|
|
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"
|
|
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
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# 03.07.24
|
|
2
2
|
|
|
3
|
+
import sys
|
|
4
|
+
|
|
3
5
|
# External libraries
|
|
4
6
|
import httpx
|
|
5
7
|
from bs4 import BeautifulSoup
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
# Internal utilities
|
|
11
|
+
from StreamingCommunity.Util.console import console
|
|
9
12
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
10
|
-
from StreamingCommunity.Util.headers import
|
|
13
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
11
14
|
from StreamingCommunity.Util.table import TVShowManager
|
|
12
15
|
|
|
13
16
|
|
|
@@ -41,11 +44,16 @@ def title_search(word_to_search: str) -> int:
|
|
|
41
44
|
domain_to_use = site_constant.DOMAIN_NOW
|
|
42
45
|
|
|
43
46
|
if not disable_searchDomain:
|
|
44
|
-
domain_to_use, base_url = search_domain(site_constant.SITE_NAME,
|
|
47
|
+
domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
|
|
48
|
+
|
|
49
|
+
if domain_to_use is None or base_url is None:
|
|
50
|
+
console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
|
|
51
|
+
console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
|
|
52
|
+
sys.exit(1)
|
|
45
53
|
|
|
46
54
|
response = httpx.get(
|
|
47
|
-
url=f"
|
|
48
|
-
headers={'user-agent':
|
|
55
|
+
url=f"{site_constant.FULL_URL}/?s={word_to_search}",
|
|
56
|
+
headers={'user-agent': get_userAgent()},
|
|
49
57
|
timeout=max_timeout
|
|
50
58
|
)
|
|
51
59
|
response.raise_for_status()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# 09.06.24
|
|
2
2
|
|
|
3
|
+
import sys
|
|
3
4
|
import logging
|
|
4
5
|
|
|
5
6
|
|
|
@@ -11,7 +12,7 @@ from bs4 import BeautifulSoup
|
|
|
11
12
|
# Internal utilities
|
|
12
13
|
from StreamingCommunity.Util.console import console
|
|
13
14
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
14
|
-
from StreamingCommunity.Util.headers import
|
|
15
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
15
16
|
from StreamingCommunity.Util.table import TVShowManager
|
|
16
17
|
|
|
17
18
|
|
|
@@ -45,13 +46,18 @@ def title_search(word_to_search: str) -> int:
|
|
|
45
46
|
domain_to_use = site_constant.DOMAIN_NOW
|
|
46
47
|
|
|
47
48
|
if not disable_searchDomain:
|
|
48
|
-
domain_to_use, base_url = search_domain(site_constant.SITE_NAME,
|
|
49
|
+
domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
|
|
50
|
+
|
|
51
|
+
if domain_to_use is None or base_url is None:
|
|
52
|
+
console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
|
|
53
|
+
console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
|
|
54
|
+
sys.exit(1)
|
|
49
55
|
|
|
50
56
|
# Send request to search for titles
|
|
51
57
|
try:
|
|
52
58
|
response = httpx.get(
|
|
53
|
-
url=f"
|
|
54
|
-
headers={'user-agent':
|
|
59
|
+
url=f"{site_constant.FULL_URL}/search/?&q={word_to_search}&quick=1&type=videobox_video&nodes=11",
|
|
60
|
+
headers={'user-agent': get_userAgent()},
|
|
55
61
|
timeout=max_timeout
|
|
56
62
|
)
|
|
57
63
|
response.raise_for_status()
|
|
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
|
|
|
12
12
|
|
|
13
13
|
# Internal utilities
|
|
14
14
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
15
|
-
from StreamingCommunity.Util.headers import
|
|
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':
|
|
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
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# 09.06.24
|
|
2
2
|
|
|
3
|
+
import sys
|
|
4
|
+
|
|
3
5
|
# External libraries
|
|
4
6
|
import httpx
|
|
5
7
|
from bs4 import BeautifulSoup
|
|
@@ -8,7 +10,7 @@ from bs4 import BeautifulSoup
|
|
|
8
10
|
# Internal utilities
|
|
9
11
|
from StreamingCommunity.Util.console import console
|
|
10
12
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
11
|
-
from StreamingCommunity.Util.headers import
|
|
13
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
12
14
|
from StreamingCommunity.Util.table import TVShowManager
|
|
13
15
|
|
|
14
16
|
|
|
@@ -42,13 +44,19 @@ def title_search(word_to_search: str) -> int:
|
|
|
42
44
|
domain_to_use = site_constant.DOMAIN_NOW
|
|
43
45
|
|
|
44
46
|
if not disable_searchDomain:
|
|
45
|
-
domain_to_use, base_url = search_domain(site_constant.SITE_NAME,
|
|
47
|
+
domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
|
|
48
|
+
|
|
49
|
+
if domain_to_use is None or base_url is None:
|
|
50
|
+
console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
|
|
51
|
+
console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
|
|
52
|
+
sys.exit(1)
|
|
46
53
|
|
|
47
54
|
# Send request to search for titles
|
|
55
|
+
print(f"{site_constant.FULL_URL}/?story={word_to_search}&do=search&subaction=search")
|
|
48
56
|
try:
|
|
49
57
|
response = httpx.get(
|
|
50
|
-
url=f"
|
|
51
|
-
headers={'user-agent':
|
|
58
|
+
url=f"{site_constant.FULL_URL}/?story={word_to_search}&do=search&subaction=search",
|
|
59
|
+
headers={'user-agent': get_userAgent()},
|
|
52
60
|
timeout=max_timeout
|
|
53
61
|
)
|
|
54
62
|
response.raise_for_status()
|
|
@@ -58,19 +66,17 @@ def title_search(word_to_search: str) -> int:
|
|
|
58
66
|
|
|
59
67
|
# Create soup and find table
|
|
60
68
|
soup = BeautifulSoup(response.text, "html.parser")
|
|
61
|
-
table_content = soup.find('div', class_="
|
|
69
|
+
table_content = soup.find('div', class_="recent-posts")
|
|
62
70
|
|
|
63
|
-
for serie_div in table_content.find_all('div', class_='
|
|
71
|
+
for serie_div in table_content.find_all('div', class_='post-thumb'):
|
|
64
72
|
try:
|
|
65
73
|
|
|
66
|
-
title = serie_div.find('
|
|
67
|
-
link = serie_div.find('
|
|
68
|
-
imdb_rating = serie_div.find('span', class_='mlnh-imdb').get_text(strip=True)
|
|
74
|
+
title = serie_div.find('a').get("title")
|
|
75
|
+
link = serie_div.find('a').get("href")
|
|
69
76
|
|
|
70
77
|
serie_info = {
|
|
71
78
|
'name': title,
|
|
72
|
-
'url': link
|
|
73
|
-
'score': imdb_rating
|
|
79
|
+
'url': link
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
media_search_manager.add_media(serie_info)
|
|
@@ -10,7 +10,7 @@ from bs4 import BeautifulSoup
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
# Internal utilities
|
|
13
|
-
from StreamingCommunity.Util.headers import
|
|
13
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
14
14
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
15
15
|
|
|
16
16
|
|
|
@@ -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':
|
|
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_="
|
|
55
|
+
self.tv_name = soup.find("h1", class_="entry-title").get_text(strip=True)
|
|
55
56
|
|
|
56
57
|
return seasons_number
|
|
57
58
|
|
|
@@ -13,7 +13,7 @@ from bs4 import BeautifulSoup
|
|
|
13
13
|
from StreamingCommunity.Util.console import console
|
|
14
14
|
from StreamingCommunity.Util.os import os_manager
|
|
15
15
|
from StreamingCommunity.Util.message import start_message
|
|
16
|
-
from StreamingCommunity.Util.headers import
|
|
16
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
17
17
|
from StreamingCommunity.Util.table import TVShowManager, get_call_stack
|
|
18
18
|
from StreamingCommunity.Lib.Downloader import HLS_Downloader
|
|
19
19
|
|
|
@@ -44,8 +44,8 @@ def download_film(movie_details: Json_film) -> str:
|
|
|
44
44
|
|
|
45
45
|
# Make request to main site
|
|
46
46
|
try:
|
|
47
|
-
url = f"
|
|
48
|
-
response = httpx.get(url, headers={'User-Agent':
|
|
47
|
+
url = f"{site_constant.FULL_URL}/set-movie-a/{movie_details.imdb_id}"
|
|
48
|
+
response = httpx.get(url, headers={'User-Agent': get_userAgent()})
|
|
49
49
|
response.raise_for_status()
|
|
50
50
|
|
|
51
51
|
except:
|
|
@@ -48,7 +48,7 @@ def download_film(select_title: MediaItem) -> str:
|
|
|
48
48
|
console.print(f"[yellow]Download: [red]{select_title.name} \n")
|
|
49
49
|
|
|
50
50
|
# Init class
|
|
51
|
-
video_source = VideoSource(site_constant.
|
|
51
|
+
video_source = VideoSource(site_constant.FULL_URL, False)
|
|
52
52
|
video_source.setup(select_title.id)
|
|
53
53
|
|
|
54
54
|
# Retrieve scws and if available master playlist
|
|
@@ -147,8 +147,8 @@ def download_series(select_season: MediaItem) -> None:
|
|
|
147
147
|
start_message()
|
|
148
148
|
|
|
149
149
|
# Init class
|
|
150
|
-
scrape_serie = ScrapeSerie(site_constant.
|
|
151
|
-
video_source = VideoSource(site_constant.
|
|
150
|
+
scrape_serie = ScrapeSerie(site_constant.FULL_URL)
|
|
151
|
+
video_source = VideoSource(site_constant.FULL_URL, True)
|
|
152
152
|
|
|
153
153
|
# Setup video source
|
|
154
154
|
scrape_serie.setup(select_season.id, select_season.slug)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# 10.12.23
|
|
2
2
|
|
|
3
|
+
import sys
|
|
4
|
+
|
|
3
5
|
|
|
4
6
|
# External libraries
|
|
5
7
|
import httpx
|
|
@@ -8,7 +10,7 @@ import httpx
|
|
|
8
10
|
# Internal utilities
|
|
9
11
|
from StreamingCommunity.Util.console import console
|
|
10
12
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
11
|
-
from StreamingCommunity.Util.headers import
|
|
13
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
12
14
|
from StreamingCommunity.Util.table import TVShowManager
|
|
13
15
|
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
|
14
16
|
|
|
@@ -40,7 +42,12 @@ def title_search(title_search: str) -> int:
|
|
|
40
42
|
domain_to_use = site_constant
|
|
41
43
|
|
|
42
44
|
if not disable_searchDomain:
|
|
43
|
-
domain_to_use, base_url = search_domain(site_constant.SITE_NAME,
|
|
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)
|
|
44
51
|
|
|
45
52
|
if site_constant.TELEGRAM_BOT:
|
|
46
53
|
bot = get_bot_instance()
|
|
@@ -50,8 +57,8 @@ def title_search(title_search: str) -> int:
|
|
|
50
57
|
|
|
51
58
|
try:
|
|
52
59
|
response = httpx.get(
|
|
53
|
-
url=f"
|
|
54
|
-
headers={'user-agent':
|
|
60
|
+
url=f"{site_constant.FULL_URL}/api/search?q={title_search.replace(' ', '+')}",
|
|
61
|
+
headers={'user-agent': get_userAgent()},
|
|
55
62
|
timeout=max_timeout
|
|
56
63
|
)
|
|
57
64
|
response.raise_for_status()
|