warp-beacon 2.2.41__tar.gz → 2.2.43__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 (54) hide show
  1. {warp_beacon-2.2.41/warp_beacon.egg-info → warp_beacon-2.2.43}/PKG-INFO +1 -1
  2. warp_beacon-2.2.43/warp_beacon/__version__.py +2 -0
  3. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scheduler/scheduler.py +2 -2
  4. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/instagram/instagram.py +2 -22
  5. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/youtube/abstract.py +1 -1
  6. {warp_beacon-2.2.41 → warp_beacon-2.2.43/warp_beacon.egg-info}/PKG-INFO +1 -1
  7. warp_beacon-2.2.41/warp_beacon/__version__.py +0 -2
  8. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/LICENSE +0 -0
  9. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/MANIFEST.in +0 -0
  10. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/README.md +0 -0
  11. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/assets/placeholder.gif +0 -0
  12. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/etc/.gitignore +0 -0
  13. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/etc/accounts.json +0 -0
  14. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/etc/warp_beacon.conf +0 -0
  15. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/etc/warp_beacon.service +0 -0
  16. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/pyproject.toml +0 -0
  17. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/setup.cfg +0 -0
  18. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/setup.py +0 -0
  19. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/__init__.py +0 -0
  20. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/compress/__init__.py +0 -0
  21. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/compress/video.py +0 -0
  22. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/jobs/__init__.py +0 -0
  23. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/jobs/abstract.py +0 -0
  24. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/jobs/download_job.py +0 -0
  25. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/jobs/types.py +0 -0
  26. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/jobs/upload_job.py +0 -0
  27. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/mediainfo/__init__.py +0 -0
  28. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/mediainfo/abstract.py +0 -0
  29. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/mediainfo/audio.py +0 -0
  30. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/mediainfo/silencer.py +0 -0
  31. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/mediainfo/video.py +0 -0
  32. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scheduler/__init__.py +0 -0
  33. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/__init__.py +0 -0
  34. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/abstract.py +0 -0
  35. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/account_selector.py +0 -0
  36. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/exceptions.py +0 -0
  37. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/instagram/__init__.py +0 -0
  38. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/youtube/__init__.py +0 -0
  39. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/youtube/music.py +0 -0
  40. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/youtube/shorts.py +0 -0
  41. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/scraper/youtube/youtube.py +0 -0
  42. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/storage/__init__.py +0 -0
  43. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/telegram/__init__.py +0 -0
  44. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/telegram/bot.py +0 -0
  45. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/telegram/handlers.py +0 -0
  46. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/telegram/placeholder_message.py +0 -0
  47. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/telegram/utils.py +0 -0
  48. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/uploader/__init__.py +0 -0
  49. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon/warp_beacon.py +0 -0
  50. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon.egg-info/SOURCES.txt +0 -0
  51. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon.egg-info/dependency_links.txt +0 -0
  52. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon.egg-info/entry_points.txt +0 -0
  53. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon.egg-info/requires.txt +0 -0
  54. {warp_beacon-2.2.41 → warp_beacon-2.2.43}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: warp_beacon
3
- Version: 2.2.41
3
+ Version: 2.2.43
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.2.43"
2
+
@@ -15,7 +15,7 @@ class IGScheduler(object):
15
15
  running = True
16
16
  thread = None
17
17
  event = None
18
- state = {"remaining": randrange(6800, 20800)}
18
+ state = {"remaining": randrange(8400, 26200)}
19
19
 
20
20
  def __init__(self, downloader: warp_beacon.scraper.AsyncDownloader) -> None:
21
21
  self.downloader = downloader
@@ -82,7 +82,7 @@ class IGScheduler(object):
82
82
  while self.running:
83
83
  try:
84
84
  if self.state["remaining"] <= 0:
85
- self.state["remaining"] = randrange(6800, 20800)
85
+ self.state["remaining"] = randrange(8400, 26200)
86
86
  logging.info("Next scheduler activity in '%s' seconds", self.state["remaining"])
87
87
 
88
88
  start_time = time.time()
@@ -237,10 +237,6 @@ class InstagramScraper(ScraperAbstract):
237
237
 
238
238
  def download(self, url: str) -> Optional[list[dict]]:
239
239
  res = []
240
- wait_timeout = int(os.environ.get("IG_WAIT_TIMEOUT", default=60))
241
- timeout_increment = int(os.environ.get("IG_TIMEOUT_INCREMENT", default=30))
242
- ratelimit_threshold = int(os.environ.get("IG_RATELIMIT_TRESHOLD", default=3))
243
- please_wait_few_minutes_count = 1
244
240
  while True:
245
241
  try:
246
242
  scrap_type, media_id = self.scrap(url)
@@ -262,27 +258,11 @@ class InstagramScraper(ScraperAbstract):
262
258
  res.append(self.download_stories(self.scrap_stories(media_id)))
263
259
  break
264
260
  except PleaseWaitFewMinutes as e:
265
- please_wait_few_minutes_count += 1
266
- logging.warning("Please wait a few minutes error. Trying to relogin ...")
261
+ logging.warning("Please wait a few minutes error.")
267
262
  logging.exception(e)
268
- if please_wait_few_minutes_count >= ratelimit_threshold:
269
- logging.warning("IG ratelimit occurred")
270
- raise IGRateLimitOccurred()
271
- wait_timeout += timeout_increment
272
- logging.info("Waiting %d seconds according configuration option `IG_WAIT_TIMEOUT` with `IG_TIMEOUT_INCREMENT`", wait_timeout)
273
- if res:
274
- for i in res:
275
- if i["media_type"] == JobType.COLLECTION:
276
- for j in i["items"]:
277
- if os.path.exists(j["local_media_path"]):
278
- os.unlink(j["local_media_path"])
279
- else:
280
- if os.path.exists(i["local_media_path"]):
281
- os.unlink(i["local_media_path"])
282
263
  if os.path.exists(self.inst_session_file):
283
264
  os.unlink(self.inst_session_file)
284
- self.login()
285
- time.sleep(wait_timeout)
265
+ raise IGRateLimitOccurred("Instagram ratelimit")
286
266
  except (MediaNotFound, ClientNotFoundError, UserNotFound) as e:
287
267
  raise NotFound(extract_exception_message(e))
288
268
  except IGUnknownError as e:
@@ -132,7 +132,7 @@ class YoutubeAbstract(ScraperAbstract):
132
132
  return size[0] // gcd, size[1] // gcd
133
133
 
134
134
  def download_thumbnail(self, video_id: str, timeout: int) -> Optional[io.BytesIO]:
135
- for i in ("https://img.youtube.com/vi/{VIDEO_ID}/maxresdefault.jpg",
135
+ for i in (#"https://img.youtube.com/vi/{VIDEO_ID}/maxresdefault.jpg",
136
136
  "https://img.youtube.com/vi/{VIDEO_ID}/hqdefault.jpg",
137
137
  "https://img.youtube.com/vi/{VIDEO_ID}/sddefault.jpg"):
138
138
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: warp_beacon
3
- Version: 2.2.41
3
+ Version: 2.2.43
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.2.41"
2
-
File without changes
File without changes
File without changes
File without changes
File without changes