warp-beacon 2.5.2__py3-none-any.whl → 2.5.4__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/exceptions.py +10 -11
- warp_beacon/scraper/youtube/abstract.py +3 -1
- warp_beacon/scraper/youtube/youtube.py +2 -12
- {warp_beacon-2.5.2.dist-info → warp_beacon-2.5.4.dist-info}/METADATA +1 -1
- {warp_beacon-2.5.2.dist-info → warp_beacon-2.5.4.dist-info}/RECORD +10 -10
- {warp_beacon-2.5.2.dist-info → warp_beacon-2.5.4.dist-info}/WHEEL +0 -0
- {warp_beacon-2.5.2.dist-info → warp_beacon-2.5.4.dist-info}/entry_points.txt +0 -0
- {warp_beacon-2.5.2.dist-info → warp_beacon-2.5.4.dist-info}/licenses/LICENSE +0 -0
- {warp_beacon-2.5.2.dist-info → warp_beacon-2.5.4.dist-info}/top_level.txt +0 -0
warp_beacon/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = "2.5.
|
1
|
+
__version__ = "2.5.4"
|
2
2
|
|
@@ -48,18 +48,17 @@ class UnknownError(ScraperError):
|
|
48
48
|
pass
|
49
49
|
|
50
50
|
def extract_exception_message(e: Exception) -> str:
|
51
|
-
msg = ""
|
52
51
|
if hasattr(e, "expected"):
|
53
|
-
|
52
|
+
return f"Expected bytes: {int(e.expected)}"
|
54
53
|
elif hasattr(e, "error_string"):
|
55
|
-
|
56
|
-
elif hasattr(e, "message"):
|
57
|
-
msg = e.message
|
54
|
+
return str(e.error_string)
|
58
55
|
elif hasattr(e, "reason"):
|
59
|
-
|
56
|
+
return str(e.reason)
|
60
57
|
elif hasattr(e, "msg"):
|
61
|
-
|
62
|
-
elif hasattr(e, "args"):
|
63
|
-
|
64
|
-
|
65
|
-
|
58
|
+
return str(e.msg)
|
59
|
+
elif hasattr(e, "args") and len(e.args) == 1:
|
60
|
+
return str(e.args[0])
|
61
|
+
elif hasattr(e, "args") and len(e.args) > 1:
|
62
|
+
return ", ".join(map(str, e.args))
|
63
|
+
else:
|
64
|
+
return str(e)
|
@@ -9,12 +9,12 @@ import ssl
|
|
9
9
|
from typing import Callable, Union, Optional
|
10
10
|
import logging
|
11
11
|
import json
|
12
|
-
import urllib
|
13
12
|
import http.client
|
14
13
|
import pytubefix.exceptions
|
15
14
|
import requests
|
16
15
|
from PIL import Image
|
17
16
|
import numpy as np
|
17
|
+
import urllib
|
18
18
|
import urllib3
|
19
19
|
from urllib.parse import urlparse, parse_qs
|
20
20
|
|
@@ -194,6 +194,8 @@ class YoutubeAbstract(ScraperAbstract):
|
|
194
194
|
urllib.error.HTTPError) as e:
|
195
195
|
if hasattr(e, "code") and (int(e.code) == 403 or int(e.code) == 400):
|
196
196
|
raise Unavailable(extract_exception_message(e))
|
197
|
+
if hasattr(e, "reason") and "Remote end closed connection without response" in str(e.reason):
|
198
|
+
raise Unavailable(extract_exception_message(e))
|
197
199
|
logging.warning("Youtube read timeout! Retrying in '%d' seconds ...", pause_secs)
|
198
200
|
logging.info("Your `YT_MAX_RETRIES` values is '%d'", max_retries)
|
199
201
|
logging.exception(extract_exception_message(e))
|
@@ -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
|
|
@@ -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=8RuWnV-K0vdd3RnLviySzYHKLw3CqW1tKYE_sbxPEBM,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
|
@@ -25,16 +25,16 @@ warp_beacon/scheduler/scheduler.py,sha256=MoPdPKiMNqVD19N-8yDc0wkTlwghFeQV3STBip
|
|
25
25
|
warp_beacon/scraper/__init__.py,sha256=Wl_GHtBW6GMH45nD9jjzSJGxBkkkrDZAFx9QIqkagO0,18218
|
26
26
|
warp_beacon/scraper/abstract.py,sha256=CiOyKCxVYWhPnOUpLAVIRNuHBftN6gmxqATdhjzkaS4,2852
|
27
27
|
warp_beacon/scraper/account_selector.py,sha256=1ftgBKyaW_JiC6KX6wPfid3YWk8hRctfOTROrH1OnJ8,6943
|
28
|
-
warp_beacon/scraper/exceptions.py,sha256=
|
28
|
+
warp_beacon/scraper/exceptions.py,sha256=EKwoF0oH2xZWbNU-v8DOaWK5skKwa3s1yTIBdlcfMpc,1452
|
29
29
|
warp_beacon/scraper/fail_handler.py,sha256=_blvckfTZ4xWVancQKVRXH5ClKGwfrBxMwvXIFZh1qA,975
|
30
30
|
warp_beacon/scraper/link_resolver.py,sha256=Rc9ZuMyOo3iPywDHwjngy-WRQ2SXhJwxcg-5ripx7tM,2447
|
31
31
|
warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
32
|
warp_beacon/scraper/instagram/instagram.py,sha256=KyOZnIt6A8wkroXkZcIJMscuy5N5ZEz9-v3Ciwo0C7M,14654
|
33
33
|
warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
|
-
warp_beacon/scraper/youtube/abstract.py,sha256=
|
34
|
+
warp_beacon/scraper/youtube/abstract.py,sha256=7LpVD6Vc3wFTCeRoCzw1Pw9FDa2EXlqzrlRCZY9zmXw,11699
|
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.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
48
|
+
warp_beacon-2.5.4.dist-info/METADATA,sha256=0sYs_RMdoN3Grokz_jHYNcbznNQXilk-bINjyjz4gyQ,22625
|
49
|
+
warp_beacon-2.5.4.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
50
|
+
warp_beacon-2.5.4.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
|
51
|
+
warp_beacon-2.5.4.dist-info/top_level.txt,sha256=4ML0-mXsezLtRXyxQUntL_ktc5HX9npTeQWzvV8kFvA,1161
|
52
|
+
warp_beacon-2.5.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|