warp-beacon 2.5.3__tar.gz → 2.5.4__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.
Files changed (61) hide show
  1. {warp_beacon-2.5.3/warp_beacon.egg-info → warp_beacon-2.5.4}/PKG-INFO +1 -1
  2. warp_beacon-2.5.4/warp_beacon/__version__.py +2 -0
  3. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/exceptions.py +10 -11
  4. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/youtube/abstract.py +3 -1
  5. {warp_beacon-2.5.3 → warp_beacon-2.5.4/warp_beacon.egg-info}/PKG-INFO +1 -1
  6. warp_beacon-2.5.3/warp_beacon/__version__.py +0 -2
  7. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/LICENSE +0 -0
  8. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/MANIFEST.in +0 -0
  9. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/README.md +0 -0
  10. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/assets/placeholder.gif +0 -0
  11. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/etc/.gitignore +0 -0
  12. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/etc/accounts.json +0 -0
  13. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/etc/proxies.json +0 -0
  14. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/etc/warp_beacon.conf +0 -0
  15. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/etc/warp_beacon.service +0 -0
  16. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/pyproject.toml +0 -0
  17. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/setup.cfg +0 -0
  18. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/setup.py +0 -0
  19. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/__init__.py +0 -0
  20. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/compress/__init__.py +0 -0
  21. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/compress/video.py +0 -0
  22. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/jobs/__init__.py +0 -0
  23. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/jobs/abstract.py +0 -0
  24. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/jobs/download_job.py +0 -0
  25. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/jobs/types.py +0 -0
  26. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/jobs/upload_job.py +0 -0
  27. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/mediainfo/__init__.py +0 -0
  28. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/mediainfo/abstract.py +0 -0
  29. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/mediainfo/audio.py +0 -0
  30. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/mediainfo/silencer.py +0 -0
  31. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/mediainfo/video.py +0 -0
  32. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scheduler/__init__.py +0 -0
  33. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scheduler/instagram_human.py +0 -0
  34. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scheduler/scheduler.py +0 -0
  35. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/__init__.py +0 -0
  36. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/abstract.py +0 -0
  37. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/account_selector.py +0 -0
  38. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/fail_handler.py +0 -0
  39. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/instagram/__init__.py +0 -0
  40. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/instagram/instagram.py +0 -0
  41. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/link_resolver.py +0 -0
  42. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/youtube/__init__.py +0 -0
  43. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/youtube/music.py +0 -0
  44. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/youtube/shorts.py +0 -0
  45. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/scraper/youtube/youtube.py +0 -0
  46. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/storage/__init__.py +0 -0
  47. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/storage/mongo.py +0 -0
  48. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/telegram/__init__.py +0 -0
  49. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/telegram/bot.py +0 -0
  50. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/telegram/caption_shortener.py +0 -0
  51. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/telegram/handlers.py +0 -0
  52. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/telegram/placeholder_message.py +0 -0
  53. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/telegram/utils.py +0 -0
  54. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/uploader/__init__.py +0 -0
  55. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/warp_beacon.py +0 -0
  56. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon/yt_auth.py +0 -0
  57. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon.egg-info/SOURCES.txt +0 -0
  58. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon.egg-info/dependency_links.txt +0 -0
  59. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon.egg-info/entry_points.txt +0 -0
  60. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon.egg-info/requires.txt +0 -0
  61. {warp_beacon-2.5.3 → warp_beacon-2.5.4}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warp_beacon
3
- Version: 2.5.3
3
+ Version: 2.5.4
4
4
  Summary: Telegram bot for expanding external media links
5
5
  Home-page: https://github.com/sb0y/warp_beacon
6
6
  Author: Andrey Bagrintsev
@@ -0,0 +1,2 @@
1
+ __version__ = "2.5.4"
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
- msg = "Expected bytes: %d" % int(e.expected)
52
+ return f"Expected bytes: {int(e.expected)}"
54
53
  elif hasattr(e, "error_string"):
55
- msg = e.error_string
56
- elif hasattr(e, "message"):
57
- msg = e.message
54
+ return str(e.error_string)
58
55
  elif hasattr(e, "reason"):
59
- msg = e.reason
56
+ return str(e.reason)
60
57
  elif hasattr(e, "msg"):
61
- msg = e.msg
62
- elif hasattr(e, "args"):
63
- msg = str(e.args)
64
-
65
- return msg
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))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warp_beacon
3
- Version: 2.5.3
3
+ Version: 2.5.4
4
4
  Summary: Telegram bot for expanding external media links
5
5
  Home-page: https://github.com/sb0y/warp_beacon
6
6
  Author: Andrey Bagrintsev
@@ -1,2 +0,0 @@
1
- __version__ = "2.5.3"
2
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes