StreamingCommunity 3.0.3__py3-none-any.whl → 3.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of StreamingCommunity might be problematic. Click here for more details.

Files changed (24) hide show
  1. StreamingCommunity/Api/Site/1337xx/__init__.py +1 -0
  2. StreamingCommunity/Api/Site/altadefinizione/__init__.py +1 -0
  3. StreamingCommunity/Api/Site/animeunity/__init__.py +1 -0
  4. StreamingCommunity/Api/Site/animeworld/__init__.py +1 -0
  5. StreamingCommunity/Api/Site/guardaserie/__init__.py +1 -0
  6. StreamingCommunity/Api/Site/raiplay/__init__.py +1 -0
  7. StreamingCommunity/Api/Site/streamingcommunity/__init__.py +1 -0
  8. StreamingCommunity/Api/Site/streamingcommunity/site.py +27 -6
  9. StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +4 -5
  10. StreamingCommunity/Api/Site/streamingwatch/__init__.py +1 -0
  11. StreamingCommunity/Upload/version.py +1 -1
  12. StreamingCommunity/Util/config_json.py +0 -2
  13. StreamingCommunity/global_search.py +2 -1
  14. StreamingCommunity/run.py +31 -43
  15. {streamingcommunity-3.0.3.dist-info → streamingcommunity-3.0.5.dist-info}/METADATA +215 -236
  16. {streamingcommunity-3.0.3.dist-info → streamingcommunity-3.0.5.dist-info}/RECORD +20 -24
  17. StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +0 -74
  18. StreamingCommunity/Api/Site/ddlstreamitaly/series.py +0 -118
  19. StreamingCommunity/Api/Site/ddlstreamitaly/site.py +0 -87
  20. StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +0 -112
  21. {streamingcommunity-3.0.3.dist-info → streamingcommunity-3.0.5.dist-info}/WHEEL +0 -0
  22. {streamingcommunity-3.0.3.dist-info → streamingcommunity-3.0.5.dist-info}/entry_points.txt +0 -0
  23. {streamingcommunity-3.0.3.dist-info → streamingcommunity-3.0.5.dist-info}/licenses/LICENSE +0 -0
  24. {streamingcommunity-3.0.3.dist-info → streamingcommunity-3.0.5.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  StreamingCommunity/__init__.py,sha256=Cw-N0VCg7sef1WqdtvVwrhs1zc4LoUhs5C8k7vpM1lQ,207
2
- StreamingCommunity/global_search.py,sha256=XPeNz1NEPZJNZAS2kba7yBYHPf32mFuWAX0eED__sMc,12341
3
- StreamingCommunity/run.py,sha256=liXsTzowM_iXLbc_K5b_7mlKoJGF0_m6tRIEOqVw9BI,13689
2
+ StreamingCommunity/global_search.py,sha256=fAl_tRCP8SeQoBifXs7hGX9-7Bd9FlJw69NjsWNUUL0,12396
3
+ StreamingCommunity/run.py,sha256=Q7ptcRA32T0VnBLUZ70L8zv1m3WlKCxY5RO8jVsKGmo,13080
4
4
  StreamingCommunity/Api/Player/ddl.py,sha256=S3UZFonJl3d3xU1fQrosRFXFhwAm8hGVQ8Ff8g-6xSI,2071
5
5
  StreamingCommunity/Api/Player/hdplayer.py,sha256=zfPcmtt8f-NfH9yapwwWpVSts-7s47vJ4_XHKJFg0i8,1875
6
6
  StreamingCommunity/Api/Player/mediapolisvod.py,sha256=OcdnE1BMSwPZM-nw74GXNJ44E9RYwGnc_kFEA-G8XyY,2294
@@ -10,43 +10,39 @@ StreamingCommunity/Api/Player/sweetpixel.py,sha256=gJSe1fop5J216CB3u8vstxLPP5Ybc
10
10
  StreamingCommunity/Api/Player/vixcloud.py,sha256=qI9ppYEMGaJ1B5y693BOMeRQri-F4-94SfRkS-9udfM,6287
11
11
  StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py,sha256=U-8QlD5kGzIk3-4t4D6QyYmiDe8UBrSuVi1YHRQb7AU,4295
12
12
  StreamingCommunity/Api/Player/Helper/Vixcloud/util.py,sha256=QLUgbwQrpuPIVNzdBlAiEJXnd-eCj_JQFckZZEEL55w,5214
13
- StreamingCommunity/Api/Site/1337xx/__init__.py,sha256=OdQxYoJ9UyGSAutZwqH1FgmOH-Z6vGVHb0CLKhwEZGM,1999
13
+ StreamingCommunity/Api/Site/1337xx/__init__.py,sha256=a5nRyazzGk6v79uUjyE8Ok0sShX0CTpOEhRUUEWs7Dw,2018
14
14
  StreamingCommunity/Api/Site/1337xx/site.py,sha256=5XVUMTQn1UqMYgo7tPAw7bGMA-tqhQnfeOGKkgGh9OA,2349
15
15
  StreamingCommunity/Api/Site/1337xx/title.py,sha256=8T3cVRb-Mt9QdOtKWVVFHz8iOHqspf7iw28E7bfTV78,1865
16
- StreamingCommunity/Api/Site/altadefinizione/__init__.py,sha256=Oxjfyg6VolwV6n2VGgICLvdRVPPMzJXMSdz8oI2Xs0M,4145
16
+ StreamingCommunity/Api/Site/altadefinizione/__init__.py,sha256=bkHoV7HmmuqU4qXOi6eHPl-2HI9v6EMvT8exTxElku4,4163
17
17
  StreamingCommunity/Api/Site/altadefinizione/film.py,sha256=0XeqMrMHnk5nbFkVTFaNZWtlXI8pETl7dsORDtIMbjg,4395
18
18
  StreamingCommunity/Api/Site/altadefinizione/series.py,sha256=-rCYx-Fa7aZiYepcIne7OdH1aaUFZZAPX-ToBv6mxFs,8192
19
19
  StreamingCommunity/Api/Site/altadefinizione/site.py,sha256=2kUNQ8ebYlX5dkSql-CvEhU01TOTNtuyEMIAD6SC3lg,2865
20
20
  StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py,sha256=bSApjfY9xd5dw0tZ1t7vB6ifAo5vAkeeEwX6IS7yH1o,3756
21
- StreamingCommunity/Api/Site/animeunity/__init__.py,sha256=EayZqxyWltgjRRDNfM32JRzgeyElK85o6s0_YJ0dpBk,4031
21
+ StreamingCommunity/Api/Site/animeunity/__init__.py,sha256=hz6xU74tie4VX58mLZoUNZ-aANvcJueEDRFig46bgow,4050
22
22
  StreamingCommunity/Api/Site/animeunity/film.py,sha256=Vqg6yag2siR-Y3ougBsV8mzdQXChxg6ghz_KVXFQ3pE,998
23
23
  StreamingCommunity/Api/Site/animeunity/serie.py,sha256=ib86sLXYsYbrvrFNbzKdhlwMUO3DT7JS5yTTrrSr2jk,5711
24
24
  StreamingCommunity/Api/Site/animeunity/site.py,sha256=iRFMUdtHricrc09gmVS1kUOQ-EqH_8zafh8ag4HHiUA,5672
25
25
  StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py,sha256=Ze6a8D2MRhiOvSw3mTpL3ue2iVc6pA5aqoyUMCTnT7A,3809
26
- StreamingCommunity/Api/Site/animeworld/__init__.py,sha256=UzHQbfxx_i6qzM586LL940CoiI3Y98IGIVP4-hXUxn4,2790
26
+ StreamingCommunity/Api/Site/animeworld/__init__.py,sha256=9XPowUaXC-baxn1XV6hAuXjMT3gsw6pR8hj-h4g2r_o,2809
27
27
  StreamingCommunity/Api/Site/animeworld/film.py,sha256=W9KOS9Wvx3Mlqx5WojR-NgnF9WX8mI79JZPS7UwG-dc,1763
28
28
  StreamingCommunity/Api/Site/animeworld/serie.py,sha256=MXyV1fK05jPW4iV9NWrRKW-R4ect-TSN78-2APayniU,3516
29
29
  StreamingCommunity/Api/Site/animeworld/site.py,sha256=HBUAYiOa-UPGAO4lyTL1qIqqpDNVhWRHZ-nyLFltl7I,3702
30
30
  StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py,sha256=CBTCH_wnTXUK_MKwq9a1k_XdvOlUrMpbUmpkD5fXVQ0,3589
31
- StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py,sha256=2FGeGNJ5SHPQzKEEmVMFWft4woGgJ-XLeNxjbSb6L9s,2141
32
- StreamingCommunity/Api/Site/ddlstreamitaly/series.py,sha256=F_D_2lwHHWN5hgLs8oUDNCYe-4SEPtWzJoU4yT_Nzfg,3726
33
- StreamingCommunity/Api/Site/ddlstreamitaly/site.py,sha256=Rh0icHsYc9RIEkaRQspeKyaFSunADntIcAwvRcnqHjw,2601
34
- StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py,sha256=tETaN-2GyFBeRsoLnGw3Kz4D4j2TMcnPzGjzlC62w_Y,3655
35
- StreamingCommunity/Api/Site/guardaserie/__init__.py,sha256=p5hzqshw5hwDl9nJ8FBWbzfPe2j7c5eNYiaftDThGcU,2768
31
+ StreamingCommunity/Api/Site/guardaserie/__init__.py,sha256=kYzD16q-KKie6Zxw2rFeiSOQ4FAJzqNC1T8__yLuBUw,2787
36
32
  StreamingCommunity/Api/Site/guardaserie/series.py,sha256=U9rMZCjRqHLFjo468vikxl-2RqO6DCJjebB-G8Y6LDg,6492
37
33
  StreamingCommunity/Api/Site/guardaserie/site.py,sha256=6PPp6qykuKZ3Sa2uY7E1xTwh1-8vHINsEpokGnathmw,2326
38
34
  StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py,sha256=_aXU-YcUtSwbC2b6QpNnWDZR8m6vp9xzBEx_zdu5tgI,4196
39
- StreamingCommunity/Api/Site/raiplay/__init__.py,sha256=xkxVkFsSxA6DHRqPuzQYXnCVNUBhfUG5xxlz6iwf1mw,3132
35
+ StreamingCommunity/Api/Site/raiplay/__init__.py,sha256=cAWAt1hyUwiuENKjkgLWOV5T_Nw3dkKKBU7pUFEGiJE,3151
40
36
  StreamingCommunity/Api/Site/raiplay/film.py,sha256=wBv5kQXx7-aCKhAZ5LABZ8zUzu_jPGdXOl9OM2p8dpY,1982
41
37
  StreamingCommunity/Api/Site/raiplay/series.py,sha256=uQVbeA_g3Z1Ciqeq99gsY2F8mC5DssH3ueGbCW8gd9Q,6161
42
38
  StreamingCommunity/Api/Site/raiplay/site.py,sha256=0s1yHhEIA-JJVb2uVe_SZKILx7TIisadZmov7ZhG28s,5160
43
39
  StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py,sha256=5F6abToCTtsvW8iIACbChZ0fPlymJiCSF_y8FRsDu7M,5002
44
- StreamingCommunity/Api/Site/streamingcommunity/__init__.py,sha256=Ej-xZ6x99zeq3p5O7-e_Evi_529x3eq_VryBLejCBiA,3796
40
+ StreamingCommunity/Api/Site/streamingcommunity/__init__.py,sha256=yD2q6jfbmwKk10c2sTxR28Gg8H83OES5DvxExseGxvo,3815
45
41
  StreamingCommunity/Api/Site/streamingcommunity/film.py,sha256=TPt0yB1DKShDIz_1OEVG1IolMoAKBOaWIZ8lQF61dfM,2575
46
42
  StreamingCommunity/Api/Site/streamingcommunity/series.py,sha256=zDvmxGHvljpyX82CSE88Zf7EIYtuXAxLDkk0qUTBRdA,8860
47
- StreamingCommunity/Api/Site/streamingcommunity/site.py,sha256=GlkxDJH5QezpLoPKRZhLE3ovX4G4ZbsBf5yVG7zbQYw,3134
48
- StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py,sha256=3sNz9uD-o9xz0dKpSnQsLPC_45v5fnW9Mzas2rQ8-Uc,5579
49
- StreamingCommunity/Api/Site/streamingwatch/__init__.py,sha256=Y6YsO6m52mKCj0AUXRmBY__zpNmSklWl32U0c7o5yIQ,3544
43
+ StreamingCommunity/Api/Site/streamingcommunity/site.py,sha256=Nk0Wnz9hLP4rSbeg9xozk2Qf_0wFB0wKxmZTmJpNKXY,3781
44
+ StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py,sha256=vnqVwDb4sxEXzMcr9B4ZZHFuADwcHSMCa3VMguKIe_U,5555
45
+ StreamingCommunity/Api/Site/streamingwatch/__init__.py,sha256=SH8Y9oM0_vcQ_-NXJ5GJK_GmHiiXaK6H0SEcrl-KBZ4,3564
50
46
  StreamingCommunity/Api/Site/streamingwatch/film.py,sha256=QWE4e7Z9c0oTidP76cZPWdOKFU77_RbMXOHOlLRtPFk,1664
51
47
  StreamingCommunity/Api/Site/streamingwatch/series.py,sha256=HF4SykhaOathLeCbYrRd1-BdCg30pDRQRCI43FnM2ck,6233
52
48
  StreamingCommunity/Api/Site/streamingwatch/site.py,sha256=tFPQTjT9AwZuAh3Z-cn110Xb1snEh4CCNv8Zuc1Vch8,3250
@@ -78,18 +74,18 @@ StreamingCommunity/Lib/TMBD/tmdb.py,sha256=byg0EFnlmd9JeLvn1N9K3QkB1KEfeMuFa7OVf
78
74
  StreamingCommunity/TelegramHelp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
75
  StreamingCommunity/TelegramHelp/telegram_bot.py,sha256=Qe1__aoK4PpDuing8JtWgdHzLee8LuYYyfeLNA7yADU,26307
80
76
  StreamingCommunity/Upload/update.py,sha256=Tp7PdU49rk1bga76_DiaghrbE7Fb3p4iq5S4CqZZy2A,3462
81
- StreamingCommunity/Upload/version.py,sha256=z1iCq1CT_TWzkf7QuFabw0M8xvUi2WI5YiI19caaPz8,171
77
+ StreamingCommunity/Upload/version.py,sha256=ZbC1PTHRJgubI-4LjpDd0E4P9_7VgawTegx9gG_SJ_8,171
82
78
  StreamingCommunity/Util/color.py,sha256=NvD0Eni-25oOOkY-szCEoc0lGvzQxyL7xhM0RE4EvUM,458
83
- StreamingCommunity/Util/config_json.py,sha256=r31BJP67EItcI6GioEX7FJzmzM0mubmZ7M73mvZ9YWo,24801
79
+ StreamingCommunity/Util/config_json.py,sha256=oPSq7H4ajPWBbJM_gIK-u6hW3EF4OpIQNyVDHxVkrOY,24532
84
80
  StreamingCommunity/Util/ffmpeg_installer.py,sha256=yRVIPwbh05tZ-duZmXkH0qasLNxaQCAT_E4cTP79Z3c,14890
85
81
  StreamingCommunity/Util/headers.py,sha256=TItkaFMx1GqsVNEIS3Tr0BGU5EHyF-HkZVliHORT3P8,308
86
82
  StreamingCommunity/Util/logger.py,sha256=9kGD6GmWj2pM8ADpJc85o7jm8DD0c5Aguqnq-9kmxos,3314
87
83
  StreamingCommunity/Util/message.py,sha256=SJaIPLvWeQqsIODVUKw3TgYRmBChovmlbcF6OUxqMI8,1425
88
84
  StreamingCommunity/Util/os.py,sha256=Q1t8K7jUR27RGEZghfN1Xmvw8BGzK0npF1cFUf1OloQ,16381
89
85
  StreamingCommunity/Util/table.py,sha256=Nw5PlsvfEIOQZWy5VhsU5OK3heuBXGwsqmLl0k8yQzc,9813
90
- streamingcommunity-3.0.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
91
- streamingcommunity-3.0.3.dist-info/METADATA,sha256=NVmIOnPKk1UDYsngEnAuP5BhBOoQLvBkfxadAZdscgE,25717
92
- streamingcommunity-3.0.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
93
- streamingcommunity-3.0.3.dist-info/entry_points.txt,sha256=Qph9XYfDC8n4LfDLOSl6gJGlkb9eFb5f-JOr_Wb_5rk,67
94
- streamingcommunity-3.0.3.dist-info/top_level.txt,sha256=YsOcxKP-WOhWpIWgBlh0coll9XUx7aqmRPT7kmt3fH0,19
95
- streamingcommunity-3.0.3.dist-info/RECORD,,
86
+ streamingcommunity-3.0.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
87
+ streamingcommunity-3.0.5.dist-info/METADATA,sha256=Tt9RG5hxrYQtg4PPhSthruh3aJKZmNkdcyNw1pRi5cE,24230
88
+ streamingcommunity-3.0.5.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
89
+ streamingcommunity-3.0.5.dist-info/entry_points.txt,sha256=Qph9XYfDC8n4LfDLOSl6gJGlkb9eFb5f-JOr_Wb_5rk,67
90
+ streamingcommunity-3.0.5.dist-info/top_level.txt,sha256=YsOcxKP-WOhWpIWgBlh0coll9XUx7aqmRPT7kmt3fH0,19
91
+ streamingcommunity-3.0.5.dist-info/RECORD,,
@@ -1,74 +0,0 @@
1
- # 09.06.24
2
-
3
- import logging
4
- from urllib.parse import quote_plus
5
-
6
-
7
- # External library
8
- from rich.console import Console
9
- from rich.prompt import Prompt
10
-
11
-
12
- # Internal utilities
13
- from StreamingCommunity.Api.Template import get_select_title
14
- from StreamingCommunity.Api.Template.config_loader import site_constant
15
- from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
16
-
17
-
18
- # Logic class
19
- from .site import title_search, media_search_manager, table_show_manager
20
- from .series import download_thread
21
-
22
-
23
- # Variable
24
- indice = 6
25
- _useFor = "serie"
26
- _priority = 0
27
- _engineDownload = "mp4"
28
-
29
- msg = Prompt()
30
- console = Console()
31
-
32
-
33
- def process_search_result(select_title):
34
- """
35
- Handles the search result and initiates the download for either a film or series.
36
- """
37
- if "Serie TV" in str(select_title.type):
38
- download_thread(select_title)
39
- else:
40
- logging.error(f"Not supported: {select_title.type}")
41
-
42
- def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_item: dict = None):
43
- """
44
- Main function of the application for search.
45
-
46
- Parameters:
47
- string_to_search (str, optional): String to search for
48
- get_onylDatabase (bool, optional): If True, return only the database object
49
- direct_item (dict, optional): Direct item to process (bypass search)
50
- """
51
- if direct_item:
52
- select_title = MediaItem(**direct_item)
53
- process_search_result(select_title)
54
- return
55
-
56
- if string_to_search is None:
57
- string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{site_constant.SITE_NAME}").strip()
58
-
59
- # Search on database
60
- len_database = title_search(quote_plus(string_to_search))
61
-
62
- # If only the database is needed, return the manager
63
- if get_onlyDatabase:
64
- return media_search_manager
65
-
66
- if len_database > 0:
67
- select_title = get_select_title(table_show_manager, media_search_manager)
68
- process_search_result(select_title)
69
-
70
- else:
71
-
72
- # If no results are found, ask again
73
- console.print(f"\n[red]Nothing matching was found for[white]: [purple]{string_to_search}")
74
- search()
@@ -1,118 +0,0 @@
1
- # 13.06.24
2
-
3
- import os
4
- from urllib.parse import urlparse
5
- from typing import Tuple
6
-
7
-
8
- # External library
9
- from rich.console import Console
10
-
11
-
12
- # Internal utilities
13
- from StreamingCommunity.Util.message import start_message
14
- from StreamingCommunity.Util.os import os_manager
15
- from StreamingCommunity.Lib.Downloader import MP4_downloader
16
-
17
-
18
- # Logic class
19
- from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
20
- from StreamingCommunity.Api.Template.Util import (
21
- manage_selection,
22
- map_episode_title,
23
- validate_episode_selection,
24
- display_episodes_list
25
- )
26
- from StreamingCommunity.Api.Template.config_loader import site_constant
27
-
28
-
29
- # Player
30
- from .util.ScrapeSerie import GetSerieInfo
31
- from StreamingCommunity.Api.Player.ddl import VideoSource
32
-
33
-
34
- # Variable
35
- console = Console()
36
-
37
-
38
- def download_video(index_episode_selected: int, scape_info_serie: GetSerieInfo) -> Tuple[str,bool]:
39
- """
40
- Downloads a specific episode.
41
-
42
- Parameters:
43
- - index_episode_selected (int): Episode index
44
- - scape_info_serie (GetSerieInfo): Scraper object with series information
45
-
46
- Returns:
47
- - str: Path to downloaded file
48
- - bool: Whether download was stopped
49
- """
50
- start_message()
51
-
52
- # Get episode information
53
- obj_episode = scape_info_serie.selectEpisode(1, index_episode_selected-1)
54
- console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [bold magenta]{obj_episode.get('name')}[/bold magenta] ([cyan]E{index_episode_selected}[/cyan]) \n")
55
-
56
- # Define filename and path for the downloaded video
57
- title_name = os_manager.get_sanitize_file(
58
- f"{map_episode_title(scape_info_serie.tv_name, None, index_episode_selected, obj_episode.get('name'))}.mp4"
59
- )
60
- mp4_path = os.path.join(site_constant.SERIES_FOLDER, scape_info_serie.tv_name)
61
-
62
- # Create output folder
63
- os_manager.create_path(mp4_path)
64
-
65
- # Setup video source
66
- video_source = VideoSource(site_constant.COOKIE, obj_episode.get('url'))
67
-
68
- # Get m3u8 master playlist
69
- master_playlist = video_source.get_playlist()
70
-
71
- # Parse start page url
72
- parsed_url = urlparse(obj_episode.get('url'))
73
-
74
- # Start download
75
- r_proc = MP4_downloader(
76
- url=master_playlist,
77
- path=os.path.join(mp4_path, title_name),
78
- referer=f"{parsed_url.scheme}://{parsed_url.netloc}/",
79
- )
80
-
81
- if r_proc != None:
82
- console.print("[green]Result: ")
83
- console.print(r_proc)
84
-
85
- return os.path.join(mp4_path, title_name), False
86
-
87
-
88
- def download_thread(dict_serie: MediaItem, episode_selection: str = None):
89
- """
90
- Download all episode of a thread
91
-
92
- Parameters:
93
- dict_serie (MediaItem): The selected media item
94
- episode_selection (str, optional): Episode selection input that bypasses manual input
95
- """
96
- scrape_serie = GetSerieInfo(dict_serie, site_constant.COOKIE)
97
-
98
- # Get episode list
99
- episodes = scrape_serie.getEpisodeSeasons()
100
- episodes_count = len(episodes)
101
-
102
- # Display episodes list and manage user selection
103
- if episode_selection is None:
104
- last_command = display_episodes_list(scrape_serie.list_episodes)
105
- else:
106
- last_command = episode_selection
107
- console.print(f"\n[cyan]Using provided episode selection: [yellow]{episode_selection}")
108
-
109
- # Validate episode selection
110
- list_episode_select = manage_selection(last_command, episodes_count)
111
- list_episode_select = validate_episode_selection(list_episode_select, episodes_count)
112
-
113
- # Download selected episodes
114
- kill_handler = bool(False)
115
- for i_episode in list_episode_select:
116
- if kill_handler:
117
- break
118
- kill_handler = download_video(i_episode, scrape_serie)[1]
@@ -1,87 +0,0 @@
1
- # 09.06.24
2
-
3
- import logging
4
-
5
-
6
- # External libraries
7
- import httpx
8
- from bs4 import BeautifulSoup
9
- from rich.console import Console
10
-
11
-
12
- # Internal utilities
13
- from StreamingCommunity.Util.config_json import config_manager
14
- from StreamingCommunity.Util.headers import get_userAgent
15
- from StreamingCommunity.Util.table import TVShowManager
16
-
17
-
18
- # Logic class
19
- from StreamingCommunity.Api.Template.config_loader import site_constant
20
- from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
21
-
22
-
23
- # Variable
24
- console = Console()
25
- media_search_manager = MediaManager()
26
- table_show_manager = TVShowManager()
27
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
28
-
29
-
30
- def title_search(query: str) -> int:
31
- """
32
- Search for titles based on a search query.
33
-
34
- Parameters:
35
- - query (str): The query to search for.
36
-
37
- Returns:
38
- - int: The number of titles found.
39
- """
40
- media_search_manager.clear()
41
- table_show_manager.clear()
42
-
43
- search_url = f"{site_constant.FULL_URL}/search/?&q={query}&quick=1&type=videobox_video&nodes=11"
44
- console.print(f"[cyan]Search url: [yellow]{search_url}")
45
-
46
- try:
47
- response = httpx.get(
48
- search_url,
49
- headers={'user-agent': get_userAgent()},
50
- timeout=max_timeout,
51
- follow_redirects=True
52
- )
53
- response.raise_for_status()
54
-
55
- except Exception as e:
56
- console.print(f"[red]Site: {site_constant.SITE_NAME}, request search error: {e}")
57
- return 0
58
-
59
- # Create soup and find table
60
- soup = BeautifulSoup(response.text, "html.parser")
61
- table_content = soup.find('ol', class_="ipsStream")
62
-
63
- if table_content:
64
- for title_div in table_content.find_all('li', class_='ipsStreamItem'):
65
- try:
66
-
67
- title_type = title_div.find("p", class_="ipsType_reset").find_all("a")[-1].get_text(strip=True)
68
- name = title_div.find("span", class_="ipsContained").find("a").get_text(strip=True)
69
- link = title_div.find("span", class_="ipsContained").find("a").get("href")
70
-
71
- title_info = {
72
- 'name': name,
73
- 'url': link,
74
- 'type': title_type,
75
- 'image': title_div.find("div", class_="ipsColumn").find("img").get("src")
76
- }
77
-
78
- media_search_manager.add_media(title_info)
79
-
80
- except Exception as e:
81
- print(f"Error parsing a film entry: {e}")
82
-
83
- return media_search_manager.get_length()
84
-
85
- else:
86
- logging.error("No table content found.")
87
- return -999
@@ -1,112 +0,0 @@
1
- # 13.06.24
2
-
3
- import sys
4
- import logging
5
- from typing import List, Dict
6
-
7
-
8
- # External libraries
9
- import httpx
10
- from bs4 import BeautifulSoup
11
-
12
-
13
- # Internal utilities
14
- from StreamingCommunity.Util.config_json import config_manager
15
- from StreamingCommunity.Util.headers import get_userAgent
16
-
17
-
18
- # Logic class
19
- from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
20
-
21
-
22
- # Variable
23
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
24
-
25
-
26
- class GetSerieInfo:
27
- def __init__(self, dict_serie: MediaItem, cookies) -> None:
28
- """
29
- Initializes the GetSerieInfo object with default values.
30
-
31
- Parameters:
32
- - dict_serie (MediaItem): Dictionary containing series information (optional).
33
- """
34
- self.headers = {'user-agent': get_userAgent()}
35
- self.cookies = cookies
36
- self.url = dict_serie.url
37
- self.tv_name = None
38
- self.list_episodes = None
39
-
40
- def get_episode_number(self) -> List[Dict[str, str]]:
41
- """
42
- Retrieves the number of episodes for a specific season.
43
-
44
- Parameters:
45
- n_season (int): The season number.
46
-
47
- Returns:
48
- List[Dict[str, str]]: List of dictionaries containing episode information.
49
- """
50
- try:
51
- response = httpx.get(f"{self.url}?area=online", cookies=self.cookies, headers=self.headers, timeout=max_timeout)
52
- response.raise_for_status()
53
-
54
- except Exception as e:
55
- logging.error(f"Insert value for [ips4_device_key, ips4_member_id, ips4_login_key] in config.json file SITE \\ ddlstreamitaly \\ cookie. Use browser debug and cookie request with a valid account, filter by DOC. Error: {e}")
56
- sys.exit(0)
57
-
58
- # Parse HTML content of the page
59
- soup = BeautifulSoup(response.text, "html.parser")
60
-
61
- # Get tv name
62
- self.tv_name = soup.find("span", class_= "ipsType_break").get_text(strip=True)
63
-
64
- # Find the container of episodes for the specified season
65
- table_content = soup.find('div', class_='ipsMargin_bottom:half')
66
- list_dict_episode = []
67
-
68
- for episode_div in table_content.find_all('a', href=True):
69
-
70
- # Get text of episode
71
- part_name = episode_div.get_text(strip=True)
72
-
73
- if part_name:
74
- obj_episode = {
75
- 'name': part_name,
76
- 'url': episode_div['href']
77
- }
78
-
79
- list_dict_episode.append(obj_episode)
80
-
81
- self.list_episodes = list_dict_episode
82
- return list_dict_episode
83
-
84
-
85
- # ------------- FOR GUI -------------
86
- def getNumberSeason(self) -> int:
87
- """
88
- Get the total number of seasons available for the series.
89
- Note: DDLStreamItaly typically provides content organized as threads, not seasons.
90
- """
91
- return 1
92
-
93
- def getEpisodeSeasons(self, season_number: int = 1) -> list:
94
- """
95
- Get all episodes for a specific season.
96
- Note: For DDLStreamItaly, this returns all episodes as they're typically in one list.
97
- """
98
- if not self.list_episodes:
99
- self.list_episodes = self.get_episode_number()
100
-
101
- return self.list_episodes
102
-
103
- def selectEpisode(self, season_number: int = 1, episode_index: int = 0) -> dict:
104
- """
105
- Get information for a specific episode.
106
- """
107
- episodes = self.getEpisodeSeasons()
108
- if not episodes or episode_index < 0 or episode_index >= len(episodes):
109
- logging.error(f"Episode index {episode_index} is out of range")
110
- return None
111
-
112
- return episodes[episode_index]