StreamingCommunity 1.7.6__tar.gz → 1.8.0__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.

Files changed (114) hide show
  1. {streamingcommunity-1.7.6/StreamingCommunity.egg-info → streamingcommunity-1.8.0}/PKG-INFO +1 -1
  2. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Player/Helper/Vixcloud/js_parser.py +4 -1
  3. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Player/Helper/Vixcloud/util.py +166 -166
  4. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Player/ddl.py +89 -89
  5. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Player/maxstream.py +151 -151
  6. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Player/supervideo.py +193 -193
  7. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Player/vixcloud.py +224 -212
  8. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/1337xx/__init__.py +50 -50
  9. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/1337xx/costant.py +14 -14
  10. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/1337xx/site.py +83 -83
  11. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/1337xx/title.py +66 -66
  12. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/altadefinizione/__init__.py +50 -50
  13. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/altadefinizione/costant.py +14 -14
  14. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/altadefinizione/film.py +69 -69
  15. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/altadefinizione/site.py +86 -86
  16. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/animeunity/__init__.py +50 -50
  17. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/animeunity/costant.py +15 -15
  18. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/animeunity/film_serie.py +131 -131
  19. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/animeunity/site.py +164 -164
  20. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/bitsearch/__init__.py +51 -51
  21. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/bitsearch/costant.py +15 -15
  22. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/bitsearch/site.py +84 -84
  23. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/bitsearch/title.py +47 -47
  24. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/cb01new/__init__.py +51 -51
  25. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/cb01new/costant.py +15 -15
  26. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/cb01new/film.py +69 -69
  27. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/cb01new/site.py +74 -74
  28. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/ddlstreamitaly/__init__.py +57 -57
  29. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/ddlstreamitaly/costant.py +16 -16
  30. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/ddlstreamitaly/series.py +142 -142
  31. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/ddlstreamitaly/site.py +92 -92
  32. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +82 -82
  33. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/guardaserie/__init__.py +52 -52
  34. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/guardaserie/costant.py +15 -15
  35. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/guardaserie/series.py +195 -195
  36. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/guardaserie/site.py +84 -84
  37. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/guardaserie/util/ScrapeSerie.py +110 -110
  38. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/mostraguarda/__init__.py +48 -48
  39. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/mostraguarda/costant.py +14 -14
  40. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/mostraguarda/film.py +94 -94
  41. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/piratebays/__init__.py +50 -50
  42. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/piratebays/costant.py +14 -14
  43. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/piratebays/site.py +88 -88
  44. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/piratebays/title.py +45 -45
  45. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/streamingcommunity/__init__.py +55 -55
  46. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/streamingcommunity/costant.py +14 -14
  47. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/streamingcommunity/film.py +70 -70
  48. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/streamingcommunity/series.py +203 -203
  49. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/streamingcommunity/site.py +125 -125
  50. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Template/Class/SearchType.py +101 -101
  51. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Template/Util/__init__.py +4 -4
  52. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Template/Util/get_domain.py +137 -137
  53. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Template/Util/manage_ep.py +153 -153
  54. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Template/Util/recall_search.py +37 -37
  55. streamingcommunity-1.8.0/StreamingCommunity/Src/Api/Template/__init__.py +3 -0
  56. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Template/site.py +87 -87
  57. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/Downloader/HLS/downloader.py +968 -968
  58. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/Downloader/HLS/proxyes.py +110 -110
  59. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/Downloader/HLS/segments.py +540 -540
  60. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/Downloader/MP4/downloader.py +156 -156
  61. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/Downloader/TOR/downloader.py +222 -222
  62. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/Downloader/__init__.py +4 -4
  63. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/Driver/driver_1.py +76 -76
  64. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/FFmpeg/__init__.py +4 -4
  65. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/FFmpeg/capture.py +170 -170
  66. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/FFmpeg/command.py +292 -292
  67. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/FFmpeg/util.py +241 -241
  68. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/M3U8/__init__.py +5 -5
  69. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/M3U8/decryptor.py +128 -128
  70. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/M3U8/estimator.py +172 -172
  71. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/M3U8/parser.py +666 -666
  72. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/M3U8/url_fixer.py +51 -51
  73. streamingcommunity-1.8.0/StreamingCommunity/Src/Lib/TMBD/__init__.py +2 -0
  74. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/TMBD/obj_tmbd.py +39 -39
  75. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Lib/TMBD/tmdb.py +345 -345
  76. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Upload/update.py +64 -64
  77. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Upload/version.py +5 -5
  78. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/_jsonConfig.py +204 -204
  79. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/call_stack.py +42 -42
  80. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/color.py +20 -20
  81. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/console.py +12 -12
  82. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/headers.py +147 -147
  83. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/logger.py +53 -53
  84. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/message.py +46 -46
  85. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/os.py +417 -417
  86. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Util/table.py +163 -163
  87. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/run.py +196 -196
  88. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0/StreamingCommunity.egg-info}/PKG-INFO +1 -1
  89. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/Test/Download/HLS.py +22 -22
  90. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/Test/Download/MP4.py +23 -23
  91. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/Test/Download/TOR.py +25 -25
  92. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/Test/Player/helper/vixcloud.py +6 -4
  93. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/Test/Player/maxtream.py +22 -22
  94. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/Test/Player/supervideo.py +22 -22
  95. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/Test/Player/vixcloud.py +26 -26
  96. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/Test/big_search.py +116 -116
  97. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/setup.py +1 -1
  98. streamingcommunity-1.7.6/StreamingCommunity/Src/Api/Template/__init__.py +0 -3
  99. streamingcommunity-1.7.6/StreamingCommunity/Src/Lib/TMBD/__init__.py +0 -2
  100. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/LICENSE +0 -0
  101. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/MANIFEST.in +0 -0
  102. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/README.md +0 -0
  103. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/animeunity/anime.py +0 -0
  104. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/animeunity/util/ScrapeSerie.py +0 -0
  105. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/ddlstreamitaly/Player/ScrapeSerie.py +0 -0
  106. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/guardaserie/Player/ScrapeSerie.py +0 -0
  107. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity/Src/Api/Site/streamingcommunity/util/ScrapeSerie.py +0 -0
  108. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity.egg-info/SOURCES.txt +0 -0
  109. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
  110. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity.egg-info/entry_points.txt +0 -0
  111. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity.egg-info/requires.txt +0 -0
  112. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/StreamingCommunity.egg-info/top_level.txt +0 -0
  113. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/requirements.txt +0 -0
  114. {streamingcommunity-1.7.6 → streamingcommunity-1.8.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: StreamingCommunity
3
- Version: 1.7.6
3
+ Version: 1.8.0
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
@@ -136,5 +136,8 @@ class JavaScriptParser:
136
136
  else:
137
137
  result[var_name] = cls.parse_value(value)
138
138
 
139
+ can_play_fhd_match = re.search(r'window\.canPlayFHD\s*=\s*(\w+);?', js_string)
140
+ if can_play_fhd_match:
141
+ result['canPlayFHD'] = cls.parse_value(can_play_fhd_match.group(1))
142
+
139
143
  return result
140
-
@@ -1,166 +1,166 @@
1
- # 23.11.24
2
-
3
- import re
4
- import logging
5
- from typing import Dict, Any, List, Union
6
-
7
-
8
- class Episode:
9
- def __init__(self, data: Dict[str, Any]):
10
- self.id: int = data.get('id', '')
11
- self.number: int = data.get('number', '')
12
- self.name: str = data.get('name', '')
13
- self.plot: str = data.get('plot', '')
14
- self.duration: int = data.get('duration', '')
15
-
16
- def __str__(self):
17
- return f"Episode(id={self.id}, number={self.number}, name='{self.name}', plot='{self.plot}', duration={self.duration} sec)"
18
-
19
- class EpisodeManager:
20
- def __init__(self):
21
- self.episodes: List[Episode] = []
22
-
23
- def add_episode(self, episode_data: Dict[str, Any]):
24
- """
25
- Add a new episode to the manager.
26
-
27
- Parameters:
28
- - episode_data (Dict[str, Any]): A dictionary containing data for the new episode.
29
- """
30
- episode = Episode(episode_data)
31
- self.episodes.append(episode)
32
-
33
- def get_length(self) -> int:
34
- """
35
- Get the number of episodes in the manager.
36
-
37
- Returns:
38
- int: Number of episodes.
39
- """
40
- return len(self.episodes)
41
-
42
- def clear(self) -> None:
43
- """
44
- This method clears the episodes list.
45
-
46
- Parameters:
47
- - self: The object instance.
48
- """
49
- self.episodes.clear()
50
-
51
- def __str__(self):
52
- return f"EpisodeManager(num_episodes={len(self.episodes)})"
53
-
54
-
55
- class Season:
56
- def __init__(self, season_data: Dict[str, Union[int, str, None]]):
57
- self.id: int = season_data.get('id')
58
- self.number: int = season_data.get('number')
59
- self.name: str = season_data.get('name')
60
- self.plot: str = season_data.get('plot')
61
- self.episodes_count: int = season_data.get('episodes_count')
62
-
63
- def __str__(self):
64
- return f"Season(id={self.id}, number={self.number}, name='{self.name}', plot='{self.plot}', episodes_count={self.episodes_count})"
65
-
66
- class SeasonManager:
67
- def __init__(self):
68
- self.seasons: List[Season] = []
69
-
70
- def add_season(self, season_data: Dict[str, Union[int, str, None]]):
71
- """
72
- Add a new season to the manager.
73
-
74
- Parameters:
75
- season_data (Dict[str, Union[int, str, None]]): A dictionary containing data for the new season.
76
- """
77
- season = Season(season_data)
78
- self.seasons.append(season)
79
-
80
- def get(self, index: int) -> Season:
81
- """
82
- Get a season item from the list by index.
83
-
84
- Parameters:
85
- index (int): The index of the seasons item to retrieve.
86
-
87
- Returns:
88
- Season: The media item at the specified index.
89
- """
90
- return self.media_list[index]
91
-
92
- def get_length(self) -> int:
93
- """
94
- Get the number of seasons in the manager.
95
-
96
- Returns:
97
- int: Number of seasons.
98
- """
99
- return len(self.seasons)
100
-
101
- def clear(self) -> None:
102
- """
103
- This method clears the seasons list.
104
-
105
- Parameters:
106
- self: The object instance.
107
- """
108
- self.seasons.clear()
109
-
110
- def __str__(self):
111
- return f"SeasonManager(num_seasons={len(self.seasons)})"
112
-
113
-
114
- class Stream:
115
- def __init__(self, name: str, url: str, active: bool):
116
- self.name = name
117
- self.url = url
118
- self.active = active
119
-
120
- def __repr__(self):
121
- return f"Stream(name={self.name!r}, url={self.url!r}, active={self.active!r})"
122
-
123
- class StreamsCollection:
124
- def __init__(self, streams: list):
125
- self.streams = [Stream(**stream) for stream in streams]
126
-
127
- def __repr__(self):
128
- return f"StreamsCollection(streams={self.streams})"
129
-
130
- def add_stream(self, name: str, url: str, active: bool):
131
- self.streams.append(Stream(name, url, active))
132
-
133
- def get_streams(self):
134
- return self.streams
135
-
136
-
137
- class WindowVideo:
138
- def __init__(self, data: Dict[str, Any]):
139
- self.data = data
140
- self.id: int = data.get('id', '')
141
- self.name: str = data.get('name', '')
142
- self.filename: str = data.get('filename', '')
143
- self.size: str = data.get('size', '')
144
- self.quality: str = data.get('quality', '')
145
- self.duration: str = data.get('duration', '')
146
- self.views: int = data.get('views', '')
147
- self.is_viewable: bool = data.get('is_viewable', '')
148
- self.status: str = data.get('status', '')
149
- self.fps: float = data.get('fps', '')
150
- self.legacy: bool = data.get('legacy', '')
151
- self.folder_id: int = data.get('folder_id', '')
152
- self.created_at_diff: str = data.get('created_at_diff', '')
153
-
154
- def __str__(self):
155
- return f"WindowVideo(id={self.id}, name='{self.name}', filename='{self.filename}', size='{self.size}', quality='{self.quality}', duration='{self.duration}', views={self.views}, is_viewable={self.is_viewable}, status='{self.status}', fps={self.fps}, legacy={self.legacy}, folder_id={self.folder_id}, created_at_diff='{self.created_at_diff}')"
156
-
157
- class WindowParameter:
158
- def __init__(self, data: Dict[str, Any]):
159
- self.data = data
160
- params = data.get('params', {})
161
- self.token: str = params.get('token', '')
162
- self.expires: str = str(params.get('expires', ''))
163
- self.url = data.get('url')
164
-
165
- def __str__(self):
166
- return (f"WindowParameter(token='{self.token}', expires='{self.expires}', url='{self.url}', data={self.data})")
1
+ # 23.11.24
2
+
3
+ import re
4
+ import logging
5
+ from typing import Dict, Any, List, Union
6
+
7
+
8
+ class Episode:
9
+ def __init__(self, data: Dict[str, Any]):
10
+ self.id: int = data.get('id', '')
11
+ self.number: int = data.get('number', '')
12
+ self.name: str = data.get('name', '')
13
+ self.plot: str = data.get('plot', '')
14
+ self.duration: int = data.get('duration', '')
15
+
16
+ def __str__(self):
17
+ return f"Episode(id={self.id}, number={self.number}, name='{self.name}', plot='{self.plot}', duration={self.duration} sec)"
18
+
19
+ class EpisodeManager:
20
+ def __init__(self):
21
+ self.episodes: List[Episode] = []
22
+
23
+ def add_episode(self, episode_data: Dict[str, Any]):
24
+ """
25
+ Add a new episode to the manager.
26
+
27
+ Parameters:
28
+ - episode_data (Dict[str, Any]): A dictionary containing data for the new episode.
29
+ """
30
+ episode = Episode(episode_data)
31
+ self.episodes.append(episode)
32
+
33
+ def get_length(self) -> int:
34
+ """
35
+ Get the number of episodes in the manager.
36
+
37
+ Returns:
38
+ int: Number of episodes.
39
+ """
40
+ return len(self.episodes)
41
+
42
+ def clear(self) -> None:
43
+ """
44
+ This method clears the episodes list.
45
+
46
+ Parameters:
47
+ - self: The object instance.
48
+ """
49
+ self.episodes.clear()
50
+
51
+ def __str__(self):
52
+ return f"EpisodeManager(num_episodes={len(self.episodes)})"
53
+
54
+
55
+ class Season:
56
+ def __init__(self, season_data: Dict[str, Union[int, str, None]]):
57
+ self.id: int = season_data.get('id')
58
+ self.number: int = season_data.get('number')
59
+ self.name: str = season_data.get('name')
60
+ self.plot: str = season_data.get('plot')
61
+ self.episodes_count: int = season_data.get('episodes_count')
62
+
63
+ def __str__(self):
64
+ return f"Season(id={self.id}, number={self.number}, name='{self.name}', plot='{self.plot}', episodes_count={self.episodes_count})"
65
+
66
+ class SeasonManager:
67
+ def __init__(self):
68
+ self.seasons: List[Season] = []
69
+
70
+ def add_season(self, season_data: Dict[str, Union[int, str, None]]):
71
+ """
72
+ Add a new season to the manager.
73
+
74
+ Parameters:
75
+ season_data (Dict[str, Union[int, str, None]]): A dictionary containing data for the new season.
76
+ """
77
+ season = Season(season_data)
78
+ self.seasons.append(season)
79
+
80
+ def get(self, index: int) -> Season:
81
+ """
82
+ Get a season item from the list by index.
83
+
84
+ Parameters:
85
+ index (int): The index of the seasons item to retrieve.
86
+
87
+ Returns:
88
+ Season: The media item at the specified index.
89
+ """
90
+ return self.media_list[index]
91
+
92
+ def get_length(self) -> int:
93
+ """
94
+ Get the number of seasons in the manager.
95
+
96
+ Returns:
97
+ int: Number of seasons.
98
+ """
99
+ return len(self.seasons)
100
+
101
+ def clear(self) -> None:
102
+ """
103
+ This method clears the seasons list.
104
+
105
+ Parameters:
106
+ self: The object instance.
107
+ """
108
+ self.seasons.clear()
109
+
110
+ def __str__(self):
111
+ return f"SeasonManager(num_seasons={len(self.seasons)})"
112
+
113
+
114
+ class Stream:
115
+ def __init__(self, name: str, url: str, active: bool):
116
+ self.name = name
117
+ self.url = url
118
+ self.active = active
119
+
120
+ def __repr__(self):
121
+ return f"Stream(name={self.name!r}, url={self.url!r}, active={self.active!r})"
122
+
123
+ class StreamsCollection:
124
+ def __init__(self, streams: list):
125
+ self.streams = [Stream(**stream) for stream in streams]
126
+
127
+ def __repr__(self):
128
+ return f"StreamsCollection(streams={self.streams})"
129
+
130
+ def add_stream(self, name: str, url: str, active: bool):
131
+ self.streams.append(Stream(name, url, active))
132
+
133
+ def get_streams(self):
134
+ return self.streams
135
+
136
+
137
+ class WindowVideo:
138
+ def __init__(self, data: Dict[str, Any]):
139
+ self.data = data
140
+ self.id: int = data.get('id', '')
141
+ self.name: str = data.get('name', '')
142
+ self.filename: str = data.get('filename', '')
143
+ self.size: str = data.get('size', '')
144
+ self.quality: str = data.get('quality', '')
145
+ self.duration: str = data.get('duration', '')
146
+ self.views: int = data.get('views', '')
147
+ self.is_viewable: bool = data.get('is_viewable', '')
148
+ self.status: str = data.get('status', '')
149
+ self.fps: float = data.get('fps', '')
150
+ self.legacy: bool = data.get('legacy', '')
151
+ self.folder_id: int = data.get('folder_id', '')
152
+ self.created_at_diff: str = data.get('created_at_diff', '')
153
+
154
+ def __str__(self):
155
+ return f"WindowVideo(id={self.id}, name='{self.name}', filename='{self.filename}', size='{self.size}', quality='{self.quality}', duration='{self.duration}', views={self.views}, is_viewable={self.is_viewable}, status='{self.status}', fps={self.fps}, legacy={self.legacy}, folder_id={self.folder_id}, created_at_diff='{self.created_at_diff}')"
156
+
157
+ class WindowParameter:
158
+ def __init__(self, data: Dict[str, Any]):
159
+ self.data = data
160
+ params = data.get('params', {})
161
+ self.token: str = params.get('token', '')
162
+ self.expires: str = str(params.get('expires', ''))
163
+ self.url = data.get('url')
164
+
165
+ def __str__(self):
166
+ return (f"WindowParameter(token='{self.token}', expires='{self.expires}', url='{self.url}', data={self.data})")
@@ -1,89 +1,89 @@
1
- # 14.06.24
2
-
3
- import logging
4
-
5
-
6
- # External libraries
7
- import httpx
8
- from bs4 import BeautifulSoup
9
-
10
-
11
- # Internal utilities
12
- from StreamingCommunity.Src.Util._jsonConfig import config_manager
13
- from StreamingCommunity.Src.Util.headers import get_headers
14
-
15
-
16
- # Variable
17
- from StreamingCommunity.Src.Api.Site.ddlstreamitaly.costant import COOKIE
18
- max_timeout = config_manager.get_int("REQUESTS", "timeout")
19
-
20
-
21
- class VideoSource:
22
- def __init__(self) -> None:
23
- """
24
- Initializes the VideoSource object with default values.
25
- """
26
- self.headers = {'user-agent': get_headers()}
27
- self.cookie = COOKIE
28
-
29
- def setup(self, url: str) -> None:
30
- """
31
- Sets up the video source with the provided URL.
32
-
33
- Parameters:
34
- - url (str): The URL of the video source.
35
- """
36
- self.url = url
37
-
38
- def make_request(self, url: str) -> str:
39
- """
40
- Make an HTTP GET request to the provided URL.
41
-
42
- Parameters:
43
- - url (str): The URL to make the request to.
44
-
45
- Returns:
46
- - str: The response content if successful, None otherwise.
47
- """
48
- try:
49
- response = httpx.get(
50
- url=url,
51
- headers=self.headers,
52
- cookies=self.cookie,
53
- timeout=max_timeout
54
- )
55
- response.raise_for_status()
56
-
57
- return response.text
58
-
59
- except Exception as err:
60
- logging.error(f"An error occurred: {err}")
61
-
62
- return None
63
-
64
- def get_playlist(self):
65
- """
66
- Retrieves the playlist URL from the video source.
67
-
68
- Returns:
69
- - tuple: The mp4 link if found, None otherwise.
70
- """
71
- try:
72
- text = self.make_request(self.url)
73
-
74
- if text:
75
- soup = BeautifulSoup(text, "html.parser")
76
- source = soup.find("source")
77
-
78
- if source:
79
- mp4_link = source.get("src")
80
- return mp4_link
81
-
82
- else:
83
- logging.error("No <source> tag found in the HTML.")
84
-
85
- else:
86
- logging.error("Failed to retrieve content from the URL.")
87
-
88
- except Exception as e:
89
- logging.error(f"An error occurred while parsing the playlist: {e}")
1
+ # 14.06.24
2
+
3
+ import logging
4
+
5
+
6
+ # External libraries
7
+ import httpx
8
+ from bs4 import BeautifulSoup
9
+
10
+
11
+ # Internal utilities
12
+ from StreamingCommunity.Src.Util._jsonConfig import config_manager
13
+ from StreamingCommunity.Src.Util.headers import get_headers
14
+
15
+
16
+ # Variable
17
+ from StreamingCommunity.Src.Api.Site.ddlstreamitaly.costant import COOKIE
18
+ max_timeout = config_manager.get_int("REQUESTS", "timeout")
19
+
20
+
21
+ class VideoSource:
22
+ def __init__(self) -> None:
23
+ """
24
+ Initializes the VideoSource object with default values.
25
+ """
26
+ self.headers = {'user-agent': get_headers()}
27
+ self.cookie = COOKIE
28
+
29
+ def setup(self, url: str) -> None:
30
+ """
31
+ Sets up the video source with the provided URL.
32
+
33
+ Parameters:
34
+ - url (str): The URL of the video source.
35
+ """
36
+ self.url = url
37
+
38
+ def make_request(self, url: str) -> str:
39
+ """
40
+ Make an HTTP GET request to the provided URL.
41
+
42
+ Parameters:
43
+ - url (str): The URL to make the request to.
44
+
45
+ Returns:
46
+ - str: The response content if successful, None otherwise.
47
+ """
48
+ try:
49
+ response = httpx.get(
50
+ url=url,
51
+ headers=self.headers,
52
+ cookies=self.cookie,
53
+ timeout=max_timeout
54
+ )
55
+ response.raise_for_status()
56
+
57
+ return response.text
58
+
59
+ except Exception as err:
60
+ logging.error(f"An error occurred: {err}")
61
+
62
+ return None
63
+
64
+ def get_playlist(self):
65
+ """
66
+ Retrieves the playlist URL from the video source.
67
+
68
+ Returns:
69
+ - tuple: The mp4 link if found, None otherwise.
70
+ """
71
+ try:
72
+ text = self.make_request(self.url)
73
+
74
+ if text:
75
+ soup = BeautifulSoup(text, "html.parser")
76
+ source = soup.find("source")
77
+
78
+ if source:
79
+ mp4_link = source.get("src")
80
+ return mp4_link
81
+
82
+ else:
83
+ logging.error("No <source> tag found in the HTML.")
84
+
85
+ else:
86
+ logging.error("Failed to retrieve content from the URL.")
87
+
88
+ except Exception as e:
89
+ logging.error(f"An error occurred while parsing the playlist: {e}")