warp-beacon 2.6.7__tar.gz → 2.6.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.
- {warp_beacon-2.6.7/warp_beacon.egg-info → warp_beacon-2.6.8}/PKG-INFO +1 -1
- warp_beacon-2.6.8/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/youtube/abstract.py +17 -7
- {warp_beacon-2.6.7 → warp_beacon-2.6.8/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.6.7/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/LICENSE +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/MANIFEST.in +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/README.md +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/assets/placeholder.gif +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/etc/.gitignore +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/etc/accounts.json +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/etc/proxies.json +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/pyproject.toml +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/setup.cfg +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/setup.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/jobs/abstract.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scheduler/instagram_human.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/account_selector.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/instagram/captcha.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/telegram/bot.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/telegram/caption_shortener.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/telegram/handlers.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon/yt_auth.py +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.6.7 → warp_beacon-2.6.8}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -143,7 +143,7 @@ class YoutubeAbstract(ScraperAbstract):
|
|
143
143
|
try:
|
144
144
|
url = i.format(VIDEO_ID=video_id)
|
145
145
|
logging.info("Youtube thumbnail url '%s'", url)
|
146
|
-
with requests.get(url, timeout=(timeout, timeout)) as response:
|
146
|
+
with requests.get(url, timeout=(timeout, timeout), proxies=self.build_proxies(self.proxy.get("dsn", ""))) as response:
|
147
147
|
if response.status_code == 200:
|
148
148
|
image = Image.open(io.BytesIO(response.content))
|
149
149
|
ratio = self.aspect_ratio(image.size)
|
@@ -228,6 +228,21 @@ class YoutubeAbstract(ScraperAbstract):
|
|
228
228
|
pass
|
229
229
|
#logging.info("bytes: %d, bytes remaining: %d", chunk, bytes_remaining)
|
230
230
|
|
231
|
+
def build_proxies(self, proxy_dsn: str) -> dict:
|
232
|
+
if not proxy_dsn:
|
233
|
+
logging.warning("Empty DSN!")
|
234
|
+
return {}
|
235
|
+
proxy = {}
|
236
|
+
if proxy_dsn:
|
237
|
+
if "https://" in proxy_dsn:
|
238
|
+
proxy["https"] = proxy_dsn
|
239
|
+
elif "http://" in proxy_dsn:
|
240
|
+
proxy["http"] = proxy_dsn
|
241
|
+
else:
|
242
|
+
logging.warning("Proxy DSN malformed!")
|
243
|
+
|
244
|
+
return proxy
|
245
|
+
|
231
246
|
def build_yt(self, url: str, session: bool = True) -> YouTube:
|
232
247
|
_default_clients["ANDROID"]["innertube_context"]["context"]["client"]["clientVersion"] = "19.08.35"
|
233
248
|
_default_clients["ANDROID_MUSIC"] = _default_clients["ANDROID"]
|
@@ -253,12 +268,7 @@ class YoutubeAbstract(ScraperAbstract):
|
|
253
268
|
proxy_dsn = self.proxy.get("dsn", "")
|
254
269
|
logging.info("Using proxy DSN '%s'", proxy_dsn)
|
255
270
|
if proxy_dsn:
|
256
|
-
|
257
|
-
yt_opts["proxies"] = {"https": proxy_dsn}
|
258
|
-
elif "http://" in proxy_dsn:
|
259
|
-
yt_opts["proxies"] = {"http": proxy_dsn}
|
260
|
-
else:
|
261
|
-
logging.warning("Proxy DSN malformed!")
|
271
|
+
yt_opts["proxies"] = self.build_proxies(proxy_dsn)
|
262
272
|
return YouTube(**yt_opts)
|
263
273
|
|
264
274
|
def build_yt_dlp(self, timeout: int = 60) -> yt_dlp.YoutubeDL:
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|