warp-beacon 2.6.64__py3-none-any.whl → 2.6.65__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.
@@ -1,2 +1,2 @@
1
- __version__ = "2.6.64"
1
+ __version__ = "2.6.65"
2
2
 
@@ -41,6 +41,7 @@ class InstagramScraper(ScraperAbstract):
41
41
  client_session_id = ""
42
42
 
43
43
  def __init__(self, client_session_id: str, account: tuple, proxy: dict=None) -> None:
44
+ self._download_progress_threshold = 20
44
45
  self.client_session_id = client_session_id
45
46
  super().__init__(account, proxy)
46
47
  #
@@ -334,7 +335,9 @@ class InstagramScraper(ScraperAbstract):
334
335
  self.status_pipe.send({
335
336
  "action": "report_download_status",
336
337
  "report_type": ReportType.ANNOUNCE,
337
- "label": "Collecting meta information ..."
338
+ "label": "Collecting meta information ...",
339
+ "chat_id": self.job.chat_id,
340
+ "message_id": self.job.placeholder_message_id
338
341
  })
339
342
  media_info = self.download_hndlr(self.cl.media_info, media_id, use_cache=False)
340
343
  logging.info("media_type is '%d', product_type is '%s'", media_info.media_type, media_info.product_type)
@@ -429,14 +432,16 @@ class InstagramScraper(ScraperAbstract):
429
432
 
430
433
  def download_progress(self, total: int | None, bytes_transferred: int, path: Path) -> None:
431
434
  percentage_of_completion = round(bytes_transferred / (total or 1) * 100)
432
- logging.debug("[Download] IG file %s, %d", str(path), percentage_of_completion)
433
- msg = {
434
- "action": "report_download_status",
435
- "current": bytes_transferred,
436
- "total": total or 0,
437
- "message_id": self.job.placeholder_message_id,
438
- "chat_id": self.job.chat_id,
439
- "completed": bool(total and bytes_transferred >= total),
440
- "report_type": ReportType.PROGRESS
441
- }
442
- self.status_pipe.send(msg)
435
+ if total == 0 or percentage_of_completion >= self._download_progress_threshold:
436
+ logging.debug("[Download] IG file %s, %d", str(path), percentage_of_completion)
437
+ msg = {
438
+ "action": "report_download_status",
439
+ "current": bytes_transferred,
440
+ "total": total or 0,
441
+ "message_id": self.job.placeholder_message_id,
442
+ "chat_id": self.job.chat_id,
443
+ "completed": bool(total and bytes_transferred >= total),
444
+ "report_type": ReportType.PROGRESS
445
+ }
446
+ self.status_pipe.send(msg)
447
+ self._download_progress_threshold += 20
@@ -93,7 +93,7 @@ class EditMessage(object):
93
93
  file_name: str = None
94
94
  ) -> None:
95
95
  progress_bar = ProgressBar(self.client)
96
- await progress_bar.progress_callback(current=0, total=0, chat_id=chat_id, message_id=message_id, operation="Uploading", label=file_name, report_type="progress")
96
+ progress_bar.progress_callback(current=0, total=0, chat_id=chat_id, message_id=message_id, operation="Uploading", label=file_name, report_type="progress")
97
97
  raw_file = await self.client.save_file(path=media.media, progress=progress_bar.progress_callback, progress_args=(chat_id, message_id, "Uploading", file_name, "progress"))
98
98
 
99
99
  caption = media.caption
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warp_beacon
3
- Version: 2.6.64
3
+ Version: 2.6.65
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
@@ -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=PCRxG2trPww_ghi60uBJkCMu7ElcLALtuoDnNWwQp8E,24
7
+ warp_beacon/__version__.py,sha256=32rDbmOI225puy5YUZbWk_yYf_0irMBp1DSaMeCfWYs,24
8
8
  warp_beacon/warp_beacon.py,sha256=ED43vNzdjDUJ_9qLCbri0bjWLWEJ69BENGj9i7G6AvM,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
@@ -31,7 +31,7 @@ warp_beacon/scraper/link_resolver.py,sha256=Rc9ZuMyOo3iPywDHwjngy-WRQ2SXhJwxcg-5
31
31
  warp_beacon/scraper/utils.py,sha256=xJfCVhiLjVPoFVupE10sTzX7UpgNWbx2EeYIsoYXGDk,43
32
32
  warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  warp_beacon/scraper/instagram/captcha.py,sha256=9UYziuqB3Tsat_ET6ex-cnZDbi6yCnsXHSpmE8MuUHk,4651
34
- warp_beacon/scraper/instagram/instagram.py,sha256=18d6vlufOb1MhyS28yELN6yI3HopFk5I1InjiQ_wrrI,16932
34
+ warp_beacon/scraper/instagram/instagram.py,sha256=nl0YBX4Ngh3txMpW0P-Oava2cSYLOn1iBT3MrztUniY,17197
35
35
  warp_beacon/scraper/instagram/wb_instagrapi.py,sha256=oN8re-17F43TEf6hdu8wC5QGUCiTsTFpdifvZwx3w7o,1854
36
36
  warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  warp_beacon/scraper/youtube/abstract.py,sha256=sU1inNjg0dv96ae8pZennYfczE4u227RcpgulOtTNLw,13132
@@ -44,7 +44,7 @@ warp_beacon/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
44
44
  warp_beacon/telegram/bot.py,sha256=W13hyJD89ozZallLq0NIb9c3uh1Hov8Axi7ab7LkE3A,19128
45
45
  warp_beacon/telegram/caption_shortener.py,sha256=EnguNCF52ne7y4P-iJAbI6K3sqoJqJbND_dX5Fhwkv0,1549
46
46
  warp_beacon/telegram/download_status.py,sha256=j89b0_85Ry4YqCgLX_J8xndINwEn4vidIV4NVMrkQJw,1447
47
- warp_beacon/telegram/edit_message.py,sha256=8Uj9t5B7Sh3Qas5GTbtJlqaL6h4cOdzMBNPgtgNvXzM,5452
47
+ warp_beacon/telegram/edit_message.py,sha256=KBGG8wEMlE0qYcLILoG8AiIhV5rKeH0rbIliQf7lAh4,5446
48
48
  warp_beacon/telegram/handlers.py,sha256=uvR6TPHSqdSxigp3wR-ewiE6t3TvVcbVLVcYGwkgD2s,9559
49
49
  warp_beacon/telegram/placeholder_message.py,sha256=wN9-BRiyrtHG-EvXtZkGJHt2CX71munQ57ITttjt0mw,6400
50
50
  warp_beacon/telegram/progress_bar.py,sha256=gzhDqRaOCwdMkWSBFj68IsI2jg5o2ZMTDVqShISLH_M,4766
@@ -52,9 +52,9 @@ warp_beacon/telegram/progress_file_reader.py,sha256=e3equyNKlKs764AD-iE9QRsh3YDH
52
52
  warp_beacon/telegram/types.py,sha256=Kvdng6uCF1HRoqQgGW1ZYYPJoVuYkFb-LDvMBbW5Hjk,89
53
53
  warp_beacon/telegram/utils.py,sha256=1Lq67aRylVJzbwSyvAgjPAGjJZFATkICvAj3TJGuJiM,4635
54
54
  warp_beacon/uploader/__init__.py,sha256=j3qcuKhpchseZLGzSsSiogqe6WdMbkK8d3I-ConhNRs,5687
55
- warp_beacon-2.6.64.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
- warp_beacon-2.6.64.dist-info/METADATA,sha256=joElrnkVdkGjxfQTDVcIijduj0ky1LNXgEJTSyoqXHI,22706
57
- warp_beacon-2.6.64.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
58
- warp_beacon-2.6.64.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
59
- warp_beacon-2.6.64.dist-info/top_level.txt,sha256=5YQRN46STNg81V_3jdzZ6bftkMxhe1hTPSFvJugDu84,1405
60
- warp_beacon-2.6.64.dist-info/RECORD,,
55
+ warp_beacon-2.6.65.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
+ warp_beacon-2.6.65.dist-info/METADATA,sha256=ikGCfqLS4r0kYZm6x-rd9DyEdhQn3IyFiUR97uih8dI,22706
57
+ warp_beacon-2.6.65.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
58
+ warp_beacon-2.6.65.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
59
+ warp_beacon-2.6.65.dist-info/top_level.txt,sha256=5YQRN46STNg81V_3jdzZ6bftkMxhe1hTPSFvJugDu84,1405
60
+ warp_beacon-2.6.65.dist-info/RECORD,,