warp-beacon 2.6.75__tar.gz → 2.6.77__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 (69) hide show
  1. {warp_beacon-2.6.75/warp_beacon.egg-info → warp_beacon-2.6.77}/PKG-INFO +1 -1
  2. warp_beacon-2.6.77/warp_beacon/__version__.py +2 -0
  3. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/instagram/instagram.py +2 -0
  4. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/instagram/wb_instagrapi.py +6 -1
  5. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/progress_bar.py +10 -10
  6. {warp_beacon-2.6.75 → warp_beacon-2.6.77/warp_beacon.egg-info}/PKG-INFO +1 -1
  7. warp_beacon-2.6.75/warp_beacon/__version__.py +0 -2
  8. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/LICENSE +0 -0
  9. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/MANIFEST.in +0 -0
  10. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/README.md +0 -0
  11. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/assets/placeholder.gif +0 -0
  12. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/etc/.gitignore +0 -0
  13. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/etc/accounts.json +0 -0
  14. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/etc/proxies.json +0 -0
  15. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/etc/warp_beacon.conf +0 -0
  16. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/etc/warp_beacon.service +0 -0
  17. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/pyproject.toml +0 -0
  18. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/setup.cfg +0 -0
  19. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/setup.py +0 -0
  20. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/__init__.py +0 -0
  21. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/compress/__init__.py +0 -0
  22. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/compress/video.py +0 -0
  23. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/jobs/__init__.py +0 -0
  24. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/jobs/abstract.py +0 -0
  25. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/jobs/download_job.py +0 -0
  26. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/jobs/types.py +0 -0
  27. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/jobs/upload_job.py +0 -0
  28. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/mediainfo/__init__.py +0 -0
  29. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/mediainfo/abstract.py +0 -0
  30. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/mediainfo/audio.py +0 -0
  31. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/mediainfo/silencer.py +0 -0
  32. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/mediainfo/video.py +0 -0
  33. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scheduler/__init__.py +0 -0
  34. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scheduler/instagram_human.py +0 -0
  35. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scheduler/scheduler.py +0 -0
  36. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/__init__.py +0 -0
  37. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/abstract.py +0 -0
  38. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/account_selector.py +0 -0
  39. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/exceptions.py +0 -0
  40. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/fail_handler.py +0 -0
  41. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/instagram/__init__.py +0 -0
  42. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/instagram/captcha.py +0 -0
  43. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/link_resolver.py +0 -0
  44. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/utils.py +0 -0
  45. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/youtube/__init__.py +0 -0
  46. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/youtube/abstract.py +0 -0
  47. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/youtube/music.py +0 -0
  48. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/youtube/shorts.py +0 -0
  49. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/scraper/youtube/youtube.py +0 -0
  50. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/storage/__init__.py +0 -0
  51. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/storage/mongo.py +0 -0
  52. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/__init__.py +0 -0
  53. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/bot.py +0 -0
  54. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/caption_shortener.py +0 -0
  55. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/download_status.py +0 -0
  56. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/edit_message.py +0 -0
  57. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/handlers.py +0 -0
  58. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/placeholder_message.py +0 -0
  59. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/progress_file_reader.py +0 -0
  60. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/types.py +0 -0
  61. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/telegram/utils.py +0 -0
  62. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/uploader/__init__.py +0 -0
  63. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/warp_beacon.py +0 -0
  64. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon/yt_auth.py +0 -0
  65. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon.egg-info/SOURCES.txt +0 -0
  66. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon.egg-info/dependency_links.txt +0 -0
  67. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon.egg-info/entry_points.txt +0 -0
  68. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/warp_beacon.egg-info/requires.txt +0 -0
  69. {warp_beacon-2.6.75 → warp_beacon-2.6.77}/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.6.75
3
+ Version: 2.6.77
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.6.77"
2
+
@@ -431,6 +431,8 @@ class InstagramScraper(ScraperAbstract):
431
431
  return password
432
432
 
433
433
  def download_progress(self, total: int | None, bytes_transferred: int, path: Path) -> None:
434
+ if not total:
435
+ return
434
436
  percentage_of_completion = round(bytes_transferred / (total or 1) * 100)
435
437
  if percentage_of_completion >= self._download_progress_threshold:
436
438
  logging.debug("[Download] IG file '%s', %d", str(path), percentage_of_completion)
@@ -25,10 +25,11 @@ class WBClient(Client):
25
25
  filename = f"{filename}.{fname.rsplit('.', 1)[1]}" if filename else fname
26
26
  path = Path(folder or Path.cwd()) / filename
27
27
 
28
- logging.info("Downloading video from %s to %s", url, path)
28
+ logging.info("Downloading video from '%s' to '%s'", url, path)
29
29
 
30
30
  response = requests.get(url, stream=True, timeout=self.request_timeout)
31
31
  response.raise_for_status()
32
+ logging.info("Response headers: %s", response.headers)
32
33
 
33
34
  content_length = 0
34
35
  try:
@@ -66,8 +67,12 @@ class WBClient(Client):
66
67
  fname = urlparse(url).path.rsplit("/", 1)[1]
67
68
  filename = f"{filename}.{(filename, fname.rsplit('.', 1)[1]) if filename else fname}"
68
69
  path = Path(folder) / filename
70
+
71
+ logging.info("Downloading photo from '%s' to '%s'", url, path)
72
+
69
73
  response = requests.get(url, stream=True, timeout=self.request_timeout)
70
74
  response.raise_for_status()
75
+ logging.info("Response headers: %s", response.headers)
71
76
 
72
77
  content_length = 0
73
78
  try:
@@ -9,7 +9,7 @@ from pyrogram import Client
9
9
  from warp_beacon.telegram.types import ReportType
10
10
 
11
11
  class ProgressBar(object):
12
- MAX_PROGRESS_RENDER_SIZE = 1_000_000 # 1 MB
12
+ MAX_PROGRESS_RENDER_SIZE = 1_500_000 # 1 MB
13
13
 
14
14
  def __init__(self, client: Client) -> None:
15
15
  self._next_threshold = 20
@@ -73,7 +73,7 @@ class ProgressBar(object):
73
73
 
74
74
  async def progress_callback(self, current: int, total: int, chat_id: int | str, message_id: int, operation: str, report_type: ReportType, label: str = "") -> None:
75
75
  if report_type == ReportType.PROGRESS:
76
- return self.render_progress_bar(current=current, total=total, chat_id=chat_id, message_id=message_id, operation=operation, label=label)
76
+ return await self.render_progress_bar(current=current, total=total, chat_id=chat_id, message_id=message_id, operation=operation, label=label)
77
77
  elif report_type == ReportType.ANNOUNCE:
78
78
  return self.render_progress_announce(chat_id=chat_id, message_id=message_id, label=label)
79
79
 
@@ -91,7 +91,7 @@ class ProgressBar(object):
91
91
  logging.warning("An error occurred while setup task to update progress bar")
92
92
  logging.exception(e)
93
93
 
94
- def render_progress_bar(self, current: int, total: int, chat_id: int | str, message_id: int, operation: str, label: str = "") -> None:
94
+ async def render_progress_bar(self, current: int, total: int, chat_id: int | str, message_id: int, operation: str, label: str = "") -> None:
95
95
  if total <= self.MAX_PROGRESS_RENDER_SIZE:
96
96
  return
97
97
  percent = 0
@@ -104,19 +104,19 @@ class ProgressBar(object):
104
104
  pbar = self.make_emoji_progress_bar(percent, 10)
105
105
  logging.info("[Progress bar]: Operation: %s %d%%", operation, percent)
106
106
  try:
107
- #await self.client.edit_message_caption(chat_id, message_id, f"{pbar} <b>{operation}</b> {label}", ParseMode.HTML)
108
107
  # we don't need to wait completion, waste of time and resources
109
108
  text = f"{pbar}\n{operation}"
110
109
  if label:
111
110
  text += f"\n<code>{label}</code>"
112
111
  if total:
113
112
  text += f" <b>{self.format_size_si(total)}</b>"
114
- task = self.client.loop.create_task(
115
- self.client.edit_message_caption(chat_id, message_id, text, ParseMode.HTML)
116
- )
117
- task.add_done_callback(self._on_edit_done)
118
- #except MessageNotModified:
119
- # logging.warning("bad_request_400.MessageNotModified")
113
+ await self.client.edit_message_caption(chat_id, message_id, text, ParseMode.HTML)
114
+ #task = self.client.loop.create_task(
115
+ # self.client.edit_message_caption(chat_id, message_id, text, ParseMode.HTML)
116
+ #)
117
+ #task.add_done_callback(self._on_edit_done)
118
+ except MessageNotModified:
119
+ logging.warning("bad_request_400.MessageNotModified")
120
120
  except Exception as e:
121
121
  logging.warning("An error occurred while setup task to update progress bar")
122
122
  logging.exception(e)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warp_beacon
3
- Version: 2.6.75
3
+ Version: 2.6.77
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.6.75"
2
-
File without changes
File without changes
File without changes
File without changes
File without changes