StreamingCommunity 1.7.6__py3-none-any.whl → 1.8.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.

Files changed (93) hide show
  1. StreamingCommunity/Src/Api/Player/Helper/Vixcloud/js_parser.py +4 -1
  2. StreamingCommunity/Src/Api/Player/Helper/Vixcloud/util.py +166 -166
  3. StreamingCommunity/Src/Api/Player/ddl.py +89 -89
  4. StreamingCommunity/Src/Api/Player/maxstream.py +151 -151
  5. StreamingCommunity/Src/Api/Player/supervideo.py +193 -193
  6. StreamingCommunity/Src/Api/Player/vixcloud.py +224 -212
  7. StreamingCommunity/Src/Api/Site/1337xx/__init__.py +50 -50
  8. StreamingCommunity/Src/Api/Site/1337xx/costant.py +14 -14
  9. StreamingCommunity/Src/Api/Site/1337xx/site.py +83 -83
  10. StreamingCommunity/Src/Api/Site/1337xx/title.py +66 -66
  11. StreamingCommunity/Src/Api/Site/altadefinizione/__init__.py +50 -50
  12. StreamingCommunity/Src/Api/Site/altadefinizione/costant.py +14 -14
  13. StreamingCommunity/Src/Api/Site/altadefinizione/film.py +69 -69
  14. StreamingCommunity/Src/Api/Site/altadefinizione/site.py +86 -86
  15. StreamingCommunity/Src/Api/Site/animeunity/__init__.py +50 -50
  16. StreamingCommunity/Src/Api/Site/animeunity/costant.py +15 -15
  17. StreamingCommunity/Src/Api/Site/animeunity/film_serie.py +131 -131
  18. StreamingCommunity/Src/Api/Site/animeunity/site.py +164 -164
  19. StreamingCommunity/Src/Api/Site/bitsearch/__init__.py +51 -51
  20. StreamingCommunity/Src/Api/Site/bitsearch/costant.py +15 -15
  21. StreamingCommunity/Src/Api/Site/bitsearch/site.py +84 -84
  22. StreamingCommunity/Src/Api/Site/bitsearch/title.py +47 -47
  23. StreamingCommunity/Src/Api/Site/cb01new/__init__.py +51 -51
  24. StreamingCommunity/Src/Api/Site/cb01new/costant.py +15 -15
  25. StreamingCommunity/Src/Api/Site/cb01new/film.py +69 -69
  26. StreamingCommunity/Src/Api/Site/cb01new/site.py +74 -74
  27. StreamingCommunity/Src/Api/Site/ddlstreamitaly/__init__.py +57 -57
  28. StreamingCommunity/Src/Api/Site/ddlstreamitaly/costant.py +16 -16
  29. StreamingCommunity/Src/Api/Site/ddlstreamitaly/series.py +142 -142
  30. StreamingCommunity/Src/Api/Site/ddlstreamitaly/site.py +92 -92
  31. StreamingCommunity/Src/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +82 -82
  32. StreamingCommunity/Src/Api/Site/guardaserie/__init__.py +52 -52
  33. StreamingCommunity/Src/Api/Site/guardaserie/costant.py +15 -15
  34. StreamingCommunity/Src/Api/Site/guardaserie/series.py +195 -195
  35. StreamingCommunity/Src/Api/Site/guardaserie/site.py +84 -84
  36. StreamingCommunity/Src/Api/Site/guardaserie/util/ScrapeSerie.py +110 -110
  37. StreamingCommunity/Src/Api/Site/mostraguarda/__init__.py +48 -48
  38. StreamingCommunity/Src/Api/Site/mostraguarda/costant.py +14 -14
  39. StreamingCommunity/Src/Api/Site/mostraguarda/film.py +94 -94
  40. StreamingCommunity/Src/Api/Site/piratebays/__init__.py +50 -50
  41. StreamingCommunity/Src/Api/Site/piratebays/costant.py +14 -14
  42. StreamingCommunity/Src/Api/Site/piratebays/site.py +88 -88
  43. StreamingCommunity/Src/Api/Site/piratebays/title.py +45 -45
  44. StreamingCommunity/Src/Api/Site/streamingcommunity/__init__.py +55 -55
  45. StreamingCommunity/Src/Api/Site/streamingcommunity/costant.py +14 -14
  46. StreamingCommunity/Src/Api/Site/streamingcommunity/film.py +70 -70
  47. StreamingCommunity/Src/Api/Site/streamingcommunity/series.py +203 -203
  48. StreamingCommunity/Src/Api/Site/streamingcommunity/site.py +125 -125
  49. StreamingCommunity/Src/Api/Template/Class/SearchType.py +101 -101
  50. StreamingCommunity/Src/Api/Template/Util/__init__.py +4 -4
  51. StreamingCommunity/Src/Api/Template/Util/get_domain.py +137 -137
  52. StreamingCommunity/Src/Api/Template/Util/manage_ep.py +153 -153
  53. StreamingCommunity/Src/Api/Template/Util/recall_search.py +37 -37
  54. StreamingCommunity/Src/Api/Template/__init__.py +2 -2
  55. StreamingCommunity/Src/Api/Template/site.py +87 -87
  56. StreamingCommunity/Src/Lib/Downloader/HLS/downloader.py +968 -968
  57. StreamingCommunity/Src/Lib/Downloader/HLS/proxyes.py +110 -110
  58. StreamingCommunity/Src/Lib/Downloader/HLS/segments.py +540 -540
  59. StreamingCommunity/Src/Lib/Downloader/MP4/downloader.py +156 -156
  60. StreamingCommunity/Src/Lib/Downloader/TOR/downloader.py +222 -222
  61. StreamingCommunity/Src/Lib/Downloader/__init__.py +4 -4
  62. StreamingCommunity/Src/Lib/Driver/driver_1.py +76 -76
  63. StreamingCommunity/Src/Lib/FFmpeg/__init__.py +4 -4
  64. StreamingCommunity/Src/Lib/FFmpeg/capture.py +170 -170
  65. StreamingCommunity/Src/Lib/FFmpeg/command.py +292 -292
  66. StreamingCommunity/Src/Lib/FFmpeg/util.py +241 -241
  67. StreamingCommunity/Src/Lib/M3U8/__init__.py +5 -5
  68. StreamingCommunity/Src/Lib/M3U8/decryptor.py +128 -128
  69. StreamingCommunity/Src/Lib/M3U8/estimator.py +172 -172
  70. StreamingCommunity/Src/Lib/M3U8/parser.py +666 -666
  71. StreamingCommunity/Src/Lib/M3U8/url_fixer.py +51 -51
  72. StreamingCommunity/Src/Lib/TMBD/__init__.py +1 -1
  73. StreamingCommunity/Src/Lib/TMBD/obj_tmbd.py +39 -39
  74. StreamingCommunity/Src/Lib/TMBD/tmdb.py +345 -345
  75. StreamingCommunity/Src/Upload/update.py +64 -64
  76. StreamingCommunity/Src/Upload/version.py +5 -5
  77. StreamingCommunity/Src/Util/_jsonConfig.py +204 -204
  78. StreamingCommunity/Src/Util/call_stack.py +42 -42
  79. StreamingCommunity/Src/Util/color.py +20 -20
  80. StreamingCommunity/Src/Util/console.py +12 -12
  81. StreamingCommunity/Src/Util/headers.py +147 -147
  82. StreamingCommunity/Src/Util/logger.py +53 -53
  83. StreamingCommunity/Src/Util/message.py +46 -46
  84. StreamingCommunity/Src/Util/os.py +417 -417
  85. StreamingCommunity/Src/Util/table.py +163 -163
  86. StreamingCommunity/run.py +196 -196
  87. {StreamingCommunity-1.7.6.dist-info → StreamingCommunity-1.8.0.dist-info}/METADATA +1 -1
  88. StreamingCommunity-1.8.0.dist-info/RECORD +97 -0
  89. StreamingCommunity-1.7.6.dist-info/RECORD +0 -97
  90. {StreamingCommunity-1.7.6.dist-info → StreamingCommunity-1.8.0.dist-info}/LICENSE +0 -0
  91. {StreamingCommunity-1.7.6.dist-info → StreamingCommunity-1.8.0.dist-info}/WHEEL +0 -0
  92. {StreamingCommunity-1.7.6.dist-info → StreamingCommunity-1.8.0.dist-info}/entry_points.txt +0 -0
  93. {StreamingCommunity-1.7.6.dist-info → StreamingCommunity-1.8.0.dist-info}/top_level.txt +0 -0
@@ -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}")