StreamingCommunity 3.0.7__tar.gz → 3.0.8__tar.gz
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-3.0.7/StreamingCommunity.egg-info → streamingcommunity-3.0.8}/PKG-INFO +2 -2
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/README.md +1 -1
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py +2 -1
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/raiplay/__init__.py +1 -1
- streamingcommunity-3.0.8/StreamingCommunity/Api/Site/raiplay/site.py +105 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +37 -17
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +6 -4
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Upload/version.py +1 -1
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/config_json.py +0 -4
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/os.py +0 -6
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8/StreamingCommunity.egg-info}/PKG-INFO +2 -2
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/setup.py +1 -1
- streamingcommunity-3.0.7/StreamingCommunity/Api/Site/raiplay/site.py +0 -173
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/LICENSE +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/MANIFEST.in +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/ddl.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/hdplayer.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/maxstream.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/mediapolisvod.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/mixdrop.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/supervideo.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/sweetpixel.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/vixcloud.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/1337xx/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/1337xx/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/1337xx/title.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/altadefinizione/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/altadefinizione/film.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/altadefinizione/series.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/altadefinizione/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeunity/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeunity/film.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeunity/serie.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeunity/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeworld/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeworld/film.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeworld/serie.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeworld/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/cb01new/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/cb01new/film.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/cb01new/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/guardaserie/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/guardaserie/series.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/guardaserie/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/raiplay/film.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/raiplay/series.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingcommunity/film.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingcommunity/series.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingcommunity/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingwatch/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingwatch/film.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingwatch/series.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingwatch/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/streamingwatch/util/ScrapeSerie.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Template/Util/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Template/Util/manage_ep.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Template/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Template/config_loader.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Template/site.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/Downloader/HLS/segments.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/Downloader/TOR/downloader.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/Downloader/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/FFmpeg/capture.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/FFmpeg/command.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/FFmpeg/util.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/decryptor.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/estimator.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/parser.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/url_fixer.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/Proxies/proxy.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/TMBD/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/TMBD/tmdb.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/TelegramHelp/config.json +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/TelegramHelp/telegram_bot.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Upload/update.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/color.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/ffmpeg_installer.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/headers.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/logger.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/message.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/table.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/__init__.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/global_search.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/run.py +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/SOURCES.txt +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/entry_points.txt +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/requires.txt +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/top_level.txt +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/requirements.txt +0 -0
- {streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: StreamingCommunity
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.8
|
|
4
4
|
Home-page: https://github.com/Lovi-0/StreamingCommunity
|
|
5
5
|
Author: Lovi-0
|
|
6
6
|
Project-URL: Bug Reports, https://github.com/Lovi-0/StreamingCommunity/issues
|
|
@@ -35,7 +35,7 @@ Dynamic: requires-dist
|
|
|
35
35
|
Dynamic: requires-python
|
|
36
36
|
|
|
37
37
|
<p align="center">
|
|
38
|
-
<img src="https://i.ibb.co/v6RnT0wY/s2.jpg" alt="Project Logo" width="
|
|
38
|
+
<img src="https://i.ibb.co/v6RnT0wY/s2.jpg" alt="Project Logo" width="450"/>
|
|
39
39
|
</p>
|
|
40
40
|
|
|
41
41
|
<p align="center">
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# 21.05.24
|
|
2
|
+
|
|
3
|
+
# External libraries
|
|
4
|
+
import httpx
|
|
5
|
+
from rich.console import Console
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Internal utilities
|
|
9
|
+
from StreamingCommunity.Util.config_json import config_manager
|
|
10
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
11
|
+
from StreamingCommunity.Util.table import TVShowManager
|
|
12
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
13
|
+
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
14
|
+
from .util.ScrapeSerie import GetSerieInfo
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# Variable
|
|
18
|
+
console = Console()
|
|
19
|
+
media_search_manager = MediaManager()
|
|
20
|
+
table_show_manager = TVShowManager()
|
|
21
|
+
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def determine_media_type(item):
|
|
25
|
+
"""
|
|
26
|
+
Determine if the item is a film or TV series by checking actual seasons count
|
|
27
|
+
using GetSerieInfo.
|
|
28
|
+
"""
|
|
29
|
+
try:
|
|
30
|
+
# Extract program name from path_id
|
|
31
|
+
program_name = None
|
|
32
|
+
if item.get('path_id'):
|
|
33
|
+
parts = item['path_id'].strip('/').split('/')
|
|
34
|
+
if len(parts) >= 2:
|
|
35
|
+
program_name = parts[-1].split('.')[0]
|
|
36
|
+
|
|
37
|
+
if not program_name:
|
|
38
|
+
return "film"
|
|
39
|
+
|
|
40
|
+
scraper = GetSerieInfo(program_name)
|
|
41
|
+
scraper.collect_info_title()
|
|
42
|
+
return "tv" if scraper.getNumberSeason() > 0 else "film"
|
|
43
|
+
|
|
44
|
+
except Exception as e:
|
|
45
|
+
console.print(f"[red]Error determining media type: {e}[/red]")
|
|
46
|
+
return "film"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def title_search(query: str) -> int:
|
|
50
|
+
"""
|
|
51
|
+
Search for titles based on a search query.
|
|
52
|
+
|
|
53
|
+
Parameters:
|
|
54
|
+
- query (str): The query to search for.
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
int: The number of titles found.
|
|
58
|
+
"""
|
|
59
|
+
media_search_manager.clear()
|
|
60
|
+
table_show_manager.clear()
|
|
61
|
+
|
|
62
|
+
search_url = f"https://www.raiplay.it/atomatic/raiplay-search-service/api/v1/msearch"
|
|
63
|
+
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
64
|
+
|
|
65
|
+
json_data = {
|
|
66
|
+
'templateIn': '6470a982e4e0301afe1f81f1',
|
|
67
|
+
'templateOut': '6516ac5d40da6c377b151642',
|
|
68
|
+
'params': {
|
|
69
|
+
'param': query,
|
|
70
|
+
'from': None,
|
|
71
|
+
'sort': 'relevance',
|
|
72
|
+
'onlyVideoQuery': False,
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
try:
|
|
77
|
+
response = httpx.post(
|
|
78
|
+
search_url,
|
|
79
|
+
headers={'user-agent': get_userAgent()},
|
|
80
|
+
json=json_data,
|
|
81
|
+
timeout=max_timeout,
|
|
82
|
+
follow_redirects=True
|
|
83
|
+
)
|
|
84
|
+
response.raise_for_status()
|
|
85
|
+
|
|
86
|
+
except Exception as e:
|
|
87
|
+
console.print(f"[red]Site: {site_constant.SITE_NAME}, request search error: {e}")
|
|
88
|
+
return 0
|
|
89
|
+
|
|
90
|
+
# Limit to only 15 results for performance
|
|
91
|
+
data = response.json().get('agg').get('titoli').get('cards')
|
|
92
|
+
data = data[:15] if len(data) > 15 else data
|
|
93
|
+
|
|
94
|
+
# Process each item and add to media manager
|
|
95
|
+
for item in data:
|
|
96
|
+
media_search_manager.add_media({
|
|
97
|
+
'id': item.get('id', ''),
|
|
98
|
+
'name': item.get('titolo', ''),
|
|
99
|
+
'type': determine_media_type(item),
|
|
100
|
+
'path_id': item.get('path_id', ''),
|
|
101
|
+
'url': f"https://www.raiplay.it{item.get('url', '')}",
|
|
102
|
+
'image': f"https://www.raiplay.it{item.get('immagine', '')}",
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
return media_search_manager.get_length()
|
|
@@ -30,28 +30,48 @@ class GetSerieInfo:
|
|
|
30
30
|
try:
|
|
31
31
|
program_url = f"{self.base_url}/programmi/{self.program_name}.json"
|
|
32
32
|
response = httpx.get(url=program_url, headers=get_headers(), timeout=max_timeout)
|
|
33
|
+
|
|
34
|
+
# If 404, content is not yet available
|
|
35
|
+
if response.status_code == 404:
|
|
36
|
+
logging.info(f"Content not yet available: {self.program_name}")
|
|
37
|
+
return
|
|
38
|
+
|
|
33
39
|
response.raise_for_status()
|
|
34
|
-
|
|
35
40
|
json_data = response.json()
|
|
36
41
|
|
|
37
42
|
# Look for seasons in the 'blocks' property
|
|
38
|
-
for block in json_data.get('blocks'):
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
for block in json_data.get('blocks', []):
|
|
44
|
+
|
|
45
|
+
# Check if block is a season block or episodi block
|
|
46
|
+
if block.get('type') == 'RaiPlay Multimedia Block':
|
|
47
|
+
if block.get('name', '').lower() == 'episodi':
|
|
48
|
+
self.publishing_block_id = block.get('id')
|
|
49
|
+
|
|
50
|
+
# Extract seasons from sets array
|
|
51
|
+
for season_set in block.get('sets', []):
|
|
52
|
+
if 'stagione' in season_set.get('name', '').lower():
|
|
53
|
+
self._add_season(season_set, block.get('id'))
|
|
54
|
+
|
|
55
|
+
elif 'stagione' in block.get('name', '').lower():
|
|
56
|
+
self.publishing_block_id = block.get('id')
|
|
57
|
+
|
|
58
|
+
# Extract season directly from block's sets
|
|
59
|
+
for season_set in block.get('sets', []):
|
|
60
|
+
self._add_season(season_set, block.get('id'))
|
|
61
|
+
|
|
62
|
+
except httpx.HTTPError as e:
|
|
54
63
|
logging.error(f"Error collecting series info: {e}")
|
|
64
|
+
except Exception as e:
|
|
65
|
+
logging.error(f"Unexpected error collecting series info: {e}")
|
|
66
|
+
|
|
67
|
+
def _add_season(self, season_set: dict, block_id: str):
|
|
68
|
+
self.seasons_manager.add_season({
|
|
69
|
+
'id': season_set.get('id', ''),
|
|
70
|
+
'number': len(self.seasons_manager.seasons) + 1,
|
|
71
|
+
'name': season_set.get('name', ''),
|
|
72
|
+
'path': season_set.get('path_id', ''),
|
|
73
|
+
'episodes_count': season_set.get('episode_size', {}).get('number', 0)
|
|
74
|
+
})
|
|
55
75
|
|
|
56
76
|
def collect_info_season(self, number_season: int) -> None:
|
|
57
77
|
"""Get episodes for a specific season."""
|
|
@@ -121,14 +121,16 @@ def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_
|
|
|
121
121
|
if site_constant.TELEGRAM_BOT:
|
|
122
122
|
bot = get_bot_instance()
|
|
123
123
|
|
|
124
|
+
# Check proxy if not already set
|
|
125
|
+
finder = ProxyFinder(site_constant.FULL_URL)
|
|
126
|
+
proxy = finder.find_fast_proxy()
|
|
127
|
+
|
|
124
128
|
if direct_item:
|
|
125
129
|
select_title_obj = MediaItem(**direct_item)
|
|
126
130
|
process_search_result(select_title_obj, selections, proxy)
|
|
127
131
|
return
|
|
128
132
|
|
|
129
|
-
|
|
130
|
-
finder = ProxyFinder(site_constant.FULL_URL)
|
|
131
|
-
proxy = finder.find_fast_proxy()
|
|
133
|
+
|
|
132
134
|
|
|
133
135
|
actual_search_query = get_user_input(string_to_search)
|
|
134
136
|
|
|
@@ -142,7 +144,7 @@ def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_
|
|
|
142
144
|
# Perform search on the database using the obtained query
|
|
143
145
|
finder = ProxyFinder(site_constant.FULL_URL)
|
|
144
146
|
proxy = finder.find_fast_proxy()
|
|
145
|
-
len_database = title_search(
|
|
147
|
+
len_database = title_search(actual_search_query, proxy)
|
|
146
148
|
|
|
147
149
|
# If only the database object (media_search_manager populated by title_search) is needed
|
|
148
150
|
if get_onlyDatabase:
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/config_json.py
RENAMED
|
@@ -39,9 +39,6 @@ class ConfigManager:
|
|
|
39
39
|
|
|
40
40
|
# Get the actual path of the module file
|
|
41
41
|
current_file_path = os.path.abspath(__file__)
|
|
42
|
-
# Navigate upwards to find the project root
|
|
43
|
-
# Assuming this file is in a package structure like StreamingCommunity/Util/config_json.py
|
|
44
|
-
# We need to go up 2 levels to reach the project root
|
|
45
42
|
base_path = os.path.dirname(os.path.dirname(os.path.dirname(current_file_path)))
|
|
46
43
|
|
|
47
44
|
# Initialize file paths
|
|
@@ -562,7 +559,6 @@ class ConfigManager:
|
|
|
562
559
|
return section in config_source
|
|
563
560
|
|
|
564
561
|
|
|
565
|
-
# Helper function to check the platform
|
|
566
562
|
def get_use_large_bar():
|
|
567
563
|
"""
|
|
568
564
|
Determine if the large bar feature should be enabled.
|
|
@@ -296,12 +296,6 @@ class InternManager():
|
|
|
296
296
|
"Google": ["8.8.8.8", "8.8.4.4"],
|
|
297
297
|
"OpenDNS": ["208.67.222.222", "208.67.220.220"],
|
|
298
298
|
"Quad9": ["9.9.9.9", "149.112.112.112"],
|
|
299
|
-
"AdGuard": ["94.140.14.14", "94.140.15.15"],
|
|
300
|
-
"Comodo": ["8.26.56.26", "8.20.247.20"],
|
|
301
|
-
"Level3": ["209.244.0.3", "209.244.0.4"],
|
|
302
|
-
"Norton": ["199.85.126.10", "199.85.127.10"],
|
|
303
|
-
"CleanBrowsing": ["185.228.168.9", "185.228.169.9"],
|
|
304
|
-
"Yandex": ["77.88.8.8", "77.88.8.1"]
|
|
305
299
|
}
|
|
306
300
|
|
|
307
301
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: StreamingCommunity
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.8
|
|
4
4
|
Home-page: https://github.com/Lovi-0/StreamingCommunity
|
|
5
5
|
Author: Lovi-0
|
|
6
6
|
Project-URL: Bug Reports, https://github.com/Lovi-0/StreamingCommunity/issues
|
|
@@ -35,7 +35,7 @@ Dynamic: requires-dist
|
|
|
35
35
|
Dynamic: requires-python
|
|
36
36
|
|
|
37
37
|
<p align="center">
|
|
38
|
-
<img src="https://i.ibb.co/v6RnT0wY/s2.jpg" alt="Project Logo" width="
|
|
38
|
+
<img src="https://i.ibb.co/v6RnT0wY/s2.jpg" alt="Project Logo" width="450"/>
|
|
39
39
|
</p>
|
|
40
40
|
|
|
41
41
|
<p align="center">
|
|
@@ -10,7 +10,7 @@ with open(os.path.join(os.path.dirname(__file__), "requirements.txt"), "r", enco
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name="StreamingCommunity",
|
|
13
|
-
version="3.0.
|
|
13
|
+
version="3.0.8",
|
|
14
14
|
long_description=read_readme(),
|
|
15
15
|
long_description_content_type="text/markdown",
|
|
16
16
|
author="Lovi-0",
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
# 21.05.24
|
|
2
|
-
|
|
3
|
-
import threading
|
|
4
|
-
import queue
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
# External libraries
|
|
8
|
-
import httpx
|
|
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
|
-
from StreamingCommunity.Lib.TMBD.tmdb import tmdb
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# Logic class
|
|
20
|
-
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
21
|
-
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# Variable
|
|
25
|
-
console = Console()
|
|
26
|
-
media_search_manager = MediaManager()
|
|
27
|
-
table_show_manager = TVShowManager()
|
|
28
|
-
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
29
|
-
MAX_THREADS = 12
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def determine_media_type(title):
|
|
33
|
-
"""
|
|
34
|
-
Use TMDB to determine if a title is a movie or TV show.
|
|
35
|
-
"""
|
|
36
|
-
try:
|
|
37
|
-
# First search as a movie
|
|
38
|
-
movie_results = tmdb._make_request("search/movie", {"query": title})
|
|
39
|
-
movie_count = len(movie_results.get("results", []))
|
|
40
|
-
|
|
41
|
-
# Then search as a TV show
|
|
42
|
-
tv_results = tmdb._make_request("search/tv", {"query": title})
|
|
43
|
-
tv_count = len(tv_results.get("results", []))
|
|
44
|
-
|
|
45
|
-
# If results found in only one category, use that
|
|
46
|
-
if movie_count > 0 and tv_count == 0:
|
|
47
|
-
return "film"
|
|
48
|
-
elif tv_count > 0 and movie_count == 0:
|
|
49
|
-
return "tv"
|
|
50
|
-
|
|
51
|
-
# If both have results, compare popularity
|
|
52
|
-
if movie_count > 0 and tv_count > 0:
|
|
53
|
-
top_movie = movie_results["results"][0]
|
|
54
|
-
top_tv = tv_results["results"][0]
|
|
55
|
-
|
|
56
|
-
return "film" if top_movie.get("popularity", 0) > top_tv.get("popularity", 0) else "tv"
|
|
57
|
-
|
|
58
|
-
return "film"
|
|
59
|
-
|
|
60
|
-
except Exception as e:
|
|
61
|
-
console.log(f"Error determining media type with TMDB: {e}")
|
|
62
|
-
return "film"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
def worker_determine_type(work_queue, result_dict, worker_id):
|
|
66
|
-
"""
|
|
67
|
-
Worker function to process items from queue and determine media types.
|
|
68
|
-
|
|
69
|
-
Parameters:
|
|
70
|
-
- work_queue: Queue containing items to process
|
|
71
|
-
- result_dict: Dictionary to store results
|
|
72
|
-
- worker_id: ID of the worker thread
|
|
73
|
-
"""
|
|
74
|
-
while not work_queue.empty():
|
|
75
|
-
try:
|
|
76
|
-
index, item = work_queue.get(block=False)
|
|
77
|
-
title = item.get('titolo', '')
|
|
78
|
-
media_type = determine_media_type(title)
|
|
79
|
-
|
|
80
|
-
result_dict[index] = {
|
|
81
|
-
'id': item.get('id', ''),
|
|
82
|
-
'name': title,
|
|
83
|
-
'type': media_type,
|
|
84
|
-
'path_id': item.get('path_id', ''),
|
|
85
|
-
'url': f"https://www.raiplay.it{item.get('url', '')}",
|
|
86
|
-
'image': f"https://www.raiplay.it{item.get('immagine', '')}",
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
work_queue.task_done()
|
|
90
|
-
|
|
91
|
-
except queue.Empty:
|
|
92
|
-
break
|
|
93
|
-
|
|
94
|
-
except Exception as e:
|
|
95
|
-
console.log(f"Worker {worker_id} error: {e}")
|
|
96
|
-
work_queue.task_done()
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
def title_search(query: str) -> int:
|
|
100
|
-
"""
|
|
101
|
-
Search for titles based on a search query.
|
|
102
|
-
|
|
103
|
-
Parameters:
|
|
104
|
-
- query (str): The query to search for.
|
|
105
|
-
|
|
106
|
-
Returns:
|
|
107
|
-
int: The number of titles found.
|
|
108
|
-
"""
|
|
109
|
-
media_search_manager.clear()
|
|
110
|
-
table_show_manager.clear()
|
|
111
|
-
|
|
112
|
-
search_url = f"https://www.raiplay.it/atomatic/raiplay-search-service/api/v1/msearch"
|
|
113
|
-
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
114
|
-
|
|
115
|
-
json_data = {
|
|
116
|
-
'templateIn': '6470a982e4e0301afe1f81f1',
|
|
117
|
-
'templateOut': '6516ac5d40da6c377b151642',
|
|
118
|
-
'params': {
|
|
119
|
-
'param': query,
|
|
120
|
-
'from': None,
|
|
121
|
-
'sort': 'relevance',
|
|
122
|
-
'onlyVideoQuery': False,
|
|
123
|
-
},
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
try:
|
|
127
|
-
response = httpx.post(
|
|
128
|
-
search_url,
|
|
129
|
-
headers={'user-agent': get_userAgent()},
|
|
130
|
-
json=json_data,
|
|
131
|
-
timeout=max_timeout,
|
|
132
|
-
follow_redirects=True
|
|
133
|
-
)
|
|
134
|
-
response.raise_for_status()
|
|
135
|
-
|
|
136
|
-
except Exception as e:
|
|
137
|
-
console.print(f"[red]Site: {site_constant.SITE_NAME}, request search error: {e}")
|
|
138
|
-
return 0
|
|
139
|
-
|
|
140
|
-
# Limit to only 15 results for performance
|
|
141
|
-
data = response.json().get('agg').get('titoli').get('cards')
|
|
142
|
-
data = data[:15] if len(data) > 15 else data
|
|
143
|
-
|
|
144
|
-
# Use multithreading to determine media types in parallel
|
|
145
|
-
work_queue = queue.Queue()
|
|
146
|
-
result_dict = {}
|
|
147
|
-
|
|
148
|
-
# Add items to the work queue
|
|
149
|
-
for i, item in enumerate(data):
|
|
150
|
-
work_queue.put((i, item))
|
|
151
|
-
|
|
152
|
-
# Create and start worker threads
|
|
153
|
-
threads = []
|
|
154
|
-
for i in range(min(MAX_THREADS, len(data))):
|
|
155
|
-
thread = threading.Thread(
|
|
156
|
-
target=worker_determine_type,
|
|
157
|
-
args=(work_queue, result_dict, i),
|
|
158
|
-
daemon=True
|
|
159
|
-
)
|
|
160
|
-
threads.append(thread)
|
|
161
|
-
thread.start()
|
|
162
|
-
|
|
163
|
-
# Wait for all threads to complete
|
|
164
|
-
for thread in threads:
|
|
165
|
-
thread.join()
|
|
166
|
-
|
|
167
|
-
# Add all results to media manager in correct order
|
|
168
|
-
for i in range(len(data)):
|
|
169
|
-
if i in result_dict:
|
|
170
|
-
media_search_manager.add_media(result_dict[i])
|
|
171
|
-
|
|
172
|
-
# Return the number of titles found
|
|
173
|
-
return media_search_manager.get_length()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/hdplayer.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/maxstream.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/mediapolisvod.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/mixdrop.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/supervideo.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/sweetpixel.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Player/vixcloud.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/1337xx/__init__.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/1337xx/site.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/1337xx/title.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeunity/film.py
RENAMED
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeunity/site.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeworld/film.py
RENAMED
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/animeworld/site.py
RENAMED
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/cb01new/film.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/cb01new/site.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/raiplay/film.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Site/raiplay/series.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Template/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Api/Template/site.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/Downloader/__init__.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/FFmpeg/__init__.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/FFmpeg/capture.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/FFmpeg/command.py
RENAMED
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/__init__.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/decryptor.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/estimator.py
RENAMED
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/M3U8/url_fixer.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/Proxies/proxy.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/TMBD/__init__.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Lib/TMBD/obj_tmbd.py
RENAMED
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/TelegramHelp/__init__.py
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/TelegramHelp/config.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity/Util/ffmpeg_installer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/requires.txt
RENAMED
|
File without changes
|
{streamingcommunity-3.0.7 → streamingcommunity-3.0.8}/StreamingCommunity.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|