warp-beacon 2.5.1__py3-none-any.whl → 2.5.3__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.
- warp_beacon/__version__.py +1 -1
- warp_beacon/scraper/youtube/youtube.py +15 -25
- {warp_beacon-2.5.1.dist-info → warp_beacon-2.5.3.dist-info}/METADATA +1 -1
- {warp_beacon-2.5.1.dist-info → warp_beacon-2.5.3.dist-info}/RECORD +8 -8
- {warp_beacon-2.5.1.dist-info → warp_beacon-2.5.3.dist-info}/WHEEL +0 -0
- {warp_beacon-2.5.1.dist-info → warp_beacon-2.5.3.dist-info}/entry_points.txt +0 -0
- {warp_beacon-2.5.1.dist-info → warp_beacon-2.5.3.dist-info}/licenses/LICENSE +0 -0
- {warp_beacon-2.5.1.dist-info → warp_beacon-2.5.3.dist-info}/top_level.txt +0 -0
warp_beacon/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = "2.5.
|
1
|
+
__version__ = "2.5.3"
|
2
2
|
|
@@ -32,19 +32,9 @@ class YoutubeScraper(YoutubeAbstract):
|
|
32
32
|
return False
|
33
33
|
|
34
34
|
def _download(self, url: str, session: bool = True, timeout: int = 60) -> list:
|
35
|
-
res =
|
36
|
-
try:
|
37
|
-
res = self._download_pytubefix_max_res(url=url, session=session, timeout=timeout)
|
38
|
-
except Exception as e:
|
39
|
-
logging.error("Failed to download video with highest resolution via pytubefix!")
|
40
|
-
logging.exception(e)
|
41
|
-
|
35
|
+
res = self._download_pytubefix_max_res(url=url, session=session, timeout=timeout)
|
42
36
|
if not res:
|
43
|
-
|
44
|
-
res = self._download_pytube_dash(url=url, session=session, timeout=timeout)
|
45
|
-
except Exception as e:
|
46
|
-
logging.error("Failed to download DASH stream video via pytubefix!")
|
47
|
-
logging.exception(e)
|
37
|
+
res = self._download_pytube_dash(url=url, session=session, timeout=timeout)
|
48
38
|
|
49
39
|
return res
|
50
40
|
|
@@ -54,19 +44,19 @@ class YoutubeScraper(YoutubeAbstract):
|
|
54
44
|
in_video_stream = input_video.streams.video[0]
|
55
45
|
in_audio_stream = input_audio.streams.audio[0]
|
56
46
|
|
57
|
-
|
58
|
-
|
47
|
+
video_stream_map = output.add_stream(template=in_video_stream)
|
48
|
+
audio_stream_map = output.add_stream(template=in_audio_stream)
|
59
49
|
|
60
50
|
for packet in input_video.demux(in_video_stream):
|
61
51
|
if packet.dts is None:
|
62
52
|
continue
|
63
|
-
packet.stream =
|
53
|
+
packet.stream = video_stream_map
|
64
54
|
output.mux(packet)
|
65
55
|
|
66
56
|
for packet in input_audio.demux(in_audio_stream):
|
67
57
|
if packet.dts is None:
|
68
58
|
continue
|
69
|
-
packet.stream =
|
59
|
+
packet.stream = audio_stream_map
|
70
60
|
output.mux(packet)
|
71
61
|
except Exception as e:
|
72
62
|
logging.error("Failed to mux audio and video!")
|
@@ -116,15 +106,15 @@ class YoutubeScraper(YoutubeAbstract):
|
|
116
106
|
output_path=f"{self.DOWNLOAD_DIR}/yt_muxed_video_{int(time.time())}.mp4")
|
117
107
|
if muxed_video:
|
118
108
|
muxed_video = self.rename_local_file(muxed_video)
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
109
|
+
logging.debug("Temp muxed filename: '%s'", muxed_video)
|
110
|
+
|
111
|
+
res.append({
|
112
|
+
"local_media_path": muxed_video,
|
113
|
+
"performer": yt.author,
|
114
|
+
"thumb": thumbnail,
|
115
|
+
"canonical_name": yt.title,
|
116
|
+
"media_type": JobType.VIDEO
|
117
|
+
})
|
128
118
|
except AgeRestrictedError as e:
|
129
119
|
raise YotubeAgeRestrictedError("Youtube Age Restricted error")
|
130
120
|
finally:
|
@@ -4,7 +4,7 @@ var/warp_beacon/accounts.json,sha256=OsXdncs6h88xrF_AP6_WDCK1waGBn9SR-uYdIeK37GM
|
|
4
4
|
var/warp_beacon/placeholder.gif,sha256=cE5CGJVaop4Sx21zx6j4AyoHU0ncmvQuS2o6hJfEH88,6064
|
5
5
|
var/warp_beacon/proxies.json,sha256=VnjlQDXumOEq72ZFjbh6IqHS1TEHqn8HPYAZqWCeSIA,95
|
6
6
|
warp_beacon/__init__.py,sha256=_rThNODmz0nDp_n4mWo_HKaNFE5jk1_7cRhHyYaencI,163
|
7
|
-
warp_beacon/__version__.py,sha256=
|
7
|
+
warp_beacon/__version__.py,sha256=322qh3fU632OT78vSP8jfr_12xwaJcFYctBN5ykTHK8,23
|
8
8
|
warp_beacon/warp_beacon.py,sha256=7KEtZDj-pdhtl6m-zFLsSojs1ZR4o7L0xbqtdmYPvfE,342
|
9
9
|
warp_beacon/yt_auth.py,sha256=GUTKqYr_tzDC-07Lx_ahWXSag8EyLxXBUnQbDBIkEmk,6022
|
10
10
|
warp_beacon/compress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -34,7 +34,7 @@ warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
34
34
|
warp_beacon/scraper/youtube/abstract.py,sha256=r_g6zkEX9h5VqQVHaQFAD-lWsEOs7Um353N98nB3tfA,11548
|
35
35
|
warp_beacon/scraper/youtube/music.py,sha256=m-1iPYe1p0OZmOlYl8gjHErsazCcXqs3qDA7KyIT6GI,2923
|
36
36
|
warp_beacon/scraper/youtube/shorts.py,sha256=sPrOjhcLlV0m5a-j4mSFsF6CkNapeUdGZqoWAYheiCM,1894
|
37
|
-
warp_beacon/scraper/youtube/youtube.py,sha256=
|
37
|
+
warp_beacon/scraper/youtube/youtube.py,sha256=ctHPmTfNO-5dcYeh1K4_PkB6MQRVgByr4EvaCvZp9WE,6171
|
38
38
|
warp_beacon/storage/__init__.py,sha256=0Vajd0oITKJfu2vmNx5uQSt3-L6vwIvUYWJo8HZCjco,3398
|
39
39
|
warp_beacon/storage/mongo.py,sha256=qC4ZiO8XXvPnP0rJwz4CJx42pqFsyAjCiW10W5QdT6E,527
|
40
40
|
warp_beacon/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -44,9 +44,9 @@ warp_beacon/telegram/handlers.py,sha256=uvR6TPHSqdSxigp3wR-ewiE6t3TvVcbVLVcYGwkg
|
|
44
44
|
warp_beacon/telegram/placeholder_message.py,sha256=wN9-BRiyrtHG-EvXtZkGJHt2CX71munQ57ITttjt0mw,6400
|
45
45
|
warp_beacon/telegram/utils.py,sha256=9uebX53G16mV7ER7WgfdWBLFHHw14S8HBt9URrIskg0,4440
|
46
46
|
warp_beacon/uploader/__init__.py,sha256=e75mOcC0vrUVjrTNMQzVUTgXGdGo4J6n8t5doOnYG5I,5616
|
47
|
-
warp_beacon-2.5.
|
48
|
-
warp_beacon-2.5.
|
49
|
-
warp_beacon-2.5.
|
50
|
-
warp_beacon-2.5.
|
51
|
-
warp_beacon-2.5.
|
52
|
-
warp_beacon-2.5.
|
47
|
+
warp_beacon-2.5.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
48
|
+
warp_beacon-2.5.3.dist-info/METADATA,sha256=_cc9n7thfLVlWMm3a1IM-_M65hDA8oVemU3pBvrXeZ0,22625
|
49
|
+
warp_beacon-2.5.3.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
50
|
+
warp_beacon-2.5.3.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
|
51
|
+
warp_beacon-2.5.3.dist-info/top_level.txt,sha256=4ML0-mXsezLtRXyxQUntL_ktc5HX9npTeQWzvV8kFvA,1161
|
52
|
+
warp_beacon-2.5.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|