warp-beacon 2.6.100__py3-none-any.whl → 2.7.1__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.100"
1
+ __version__ = "2.7.1"
2
2
 
@@ -42,7 +42,7 @@ class InstagramScraper(ScraperAbstract):
42
42
  client_session_id = ""
43
43
 
44
44
  def __init__(self, client_session_id: str, account: tuple, proxy: dict=None) -> None:
45
- self._download_progress_threshold = 20
45
+ self._download_progress_threshold = 5
46
46
  self.client_session_id = client_session_id
47
47
  super().__init__(account, proxy)
48
48
  #
@@ -460,4 +460,4 @@ class InstagramScraper(ScraperAbstract):
460
460
  "report_type": ReportType.PROGRESS
461
461
  }
462
462
  self.status_pipe.send(msg)
463
- self._download_progress_threshold += 20
463
+ self._download_progress_threshold += 5
@@ -16,5 +16,5 @@ class ScraperUtils(object):
16
16
  return random_client
17
17
 
18
18
  @staticmethod
19
- def get_ua(browsers: list = ['Facebook', 'Android'], platforms: list = ['mobile', 'tablet'], os: list =['Android', 'iOS']) -> str:
19
+ def get_ua(browsers: list = ['Facebook', 'Android'], platforms: list = ['mobile', 'tablet'], os: list =['Android']) -> str:
20
20
  return ScraperUtils.get_ua_dict(browsers=browsers, platforms=platforms, os=os)["useragent"]
@@ -37,7 +37,7 @@ class YoutubeAbstract(ScraperAbstract):
37
37
 
38
38
  def __init__(self, account: tuple, proxy: dict=None) -> None:
39
39
  super().__init__(account, proxy)
40
- self._download_progress_threshold = 20
40
+ self._download_progress_threshold = 5
41
41
 
42
42
  def validate_session(self) -> int:
43
43
  try:
@@ -245,7 +245,7 @@ class YoutubeAbstract(ScraperAbstract):
245
245
  self.status_pipe.send(msg)
246
246
  logging.debug("[Download worker] Downloaded %d%%", percentage_of_completion)
247
247
  if total_size > 0:
248
- self._download_progress_threshold += 20
248
+ self._download_progress_threshold += 5
249
249
 
250
250
  def build_proxies(self, proxy_dsn: str) -> dict:
251
251
  if not proxy_dsn:
@@ -310,7 +310,7 @@ class YoutubeAbstract(ScraperAbstract):
310
310
  self.status_pipe.send(msg)
311
311
  logging.debug("[Download worker][yt_dlp] Downloaded %d%%", percentage_of_completion)
312
312
  if total_size > 0:
313
- self._download_progress_threshold += 20
313
+ self._download_progress_threshold += 5
314
314
 
315
315
  def build_yt_dlp(self, timeout: int = 60) -> yt_dlp.YoutubeDL:
316
316
  auth_data = {}
@@ -64,7 +64,8 @@ class Bot(object):
64
64
  api_id=tg_api_id,
65
65
  api_hash=tg_api_hash,
66
66
  workdir='/var/warp_beacon',
67
- workers=int(os.environ.get("TG_WORKERS_POOL_SIZE", default=workers_amount))
67
+ workers=int(os.environ.get("TG_WORKERS_POOL_SIZE", default=workers_amount)),
68
+ ipv6=os.environ.get("TG_IPV6", default="false").lower() in ("1", "true", "yes")
68
69
  )
69
70
 
70
71
  self.editor = EditMessage(self.client)
@@ -12,7 +12,7 @@ class ProgressBar(object):
12
12
  MAX_PROGRESS_RENDER_SIZE = 1_500_000 # 1 MB
13
13
 
14
14
  def __init__(self, client: Client) -> None:
15
- self._next_threshold = 20
15
+ self._next_threshold = 5
16
16
  self.client = client
17
17
  self.complete = False
18
18
 
@@ -97,9 +97,9 @@ class ProgressBar(object):
97
97
  percent = 0
98
98
  if total:
99
99
  percent = round(current * 100 / (total or 1))
100
- if percent >= 100:
100
+ if percent > 100:
101
101
  return
102
- if total == 0 or percent >= self._next_threshold:
102
+ if total == 0 or percent == 0 or percent >= self._next_threshold:
103
103
  #pbar = self.make_progress_bar(percent, 100, 25)
104
104
  pbar = self.make_emoji_progress_bar(percent, 10)
105
105
  logging.info("[Progress bar]: Operation: %s %d%%", operation, percent)
@@ -121,7 +121,7 @@ class ProgressBar(object):
121
121
  logging.warning("An error occurred while setup task to update progress bar")
122
122
  logging.exception(e)
123
123
  if total > 0:
124
- self._next_threshold += 20
124
+ self._next_threshold += 5
125
125
 
126
126
  @staticmethod
127
127
  def make_hash(chat_id: str | int, message_id: int, algorithm: str = 'sha256') -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warp_beacon
3
- Version: 2.6.100
3
+ Version: 2.7.1
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=vyeKe3_WSIt4lRxqiP-8rEBp4VAhB9JEQhoq-WmnCKY,25
7
+ warp_beacon/__version__.py,sha256=rwtSCMK1l16fBRULsrzkt6SreUVD9FyNOJaezZj-L18,23
8
8
  warp_beacon/warp_beacon.py,sha256=ADCR30uGXIsDrt9WoiI9Ghu2QtWs0qZIK6x3pQKM_B4,1109
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
@@ -28,33 +28,33 @@ warp_beacon/scraper/account_selector.py,sha256=vxIVesGPQKVtL3uSn5CFlZB1eAYowUN7l
28
28
  warp_beacon/scraper/exceptions.py,sha256=EKwoF0oH2xZWbNU-v8DOaWK5skKwa3s1yTIBdlcfMpc,1452
29
29
  warp_beacon/scraper/fail_handler.py,sha256=zcPK3ZVEsu6JmHYcWP7L3naTRK3gWFVRkpP84VBOtJs,964
30
30
  warp_beacon/scraper/link_resolver.py,sha256=Rc9ZuMyOo3iPywDHwjngy-WRQ2SXhJwxcg-5ripx7tM,2447
31
- warp_beacon/scraper/utils.py,sha256=2ixy3ln-N7OXSqO2bvYw1407WuR-xZBX4l3lyteCTm4,1261
31
+ warp_beacon/scraper/utils.py,sha256=eqgnA9NXC3ZZLiNqCJFoflDGIorfjuU5URBOJTbBfmU,1254
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=xDjKJa_TdXC-Xk8ji5oGKQmo7LrpRNSshLcuKuFJrCM,17863
34
+ warp_beacon/scraper/instagram/instagram.py,sha256=cGInSO6UzmPcq2DokoL8_jmuIco1PBlVrafywDXazBg,17861
35
35
  warp_beacon/scraper/instagram/wb_instagrapi.py,sha256=M5NCtLwdUvByjmDBZMWljgB275R0LSBFblsGpapluD0,5968
36
36
  warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- warp_beacon/scraper/youtube/abstract.py,sha256=AnKWFhfUvPikQ4tZflb0wvnZnkb8ums6eTZNx5iCbdM,15233
37
+ warp_beacon/scraper/youtube/abstract.py,sha256=W8Z_MOLjwwKp_qGKp99VZRMUQ8wm5rkYBk7lQFy6g-w,15230
38
38
  warp_beacon/scraper/youtube/music.py,sha256=5AeSBQyUgVCJT2hoBCV2WvlyuV9US09SYJhmBG_P9F8,2755
39
39
  warp_beacon/scraper/youtube/shorts.py,sha256=1GtoYUlxAwcgSQcn80u5ehNJytH5AN5dPOicmX-XD8E,1705
40
40
  warp_beacon/scraper/youtube/youtube.py,sha256=x9v9p1coA9TvBhxjNAofGu4UBkAEdYPE2ePRnU-5tK0,7233
41
41
  warp_beacon/storage/__init__.py,sha256=0Vajd0oITKJfu2vmNx5uQSt3-L6vwIvUYWJo8HZCjco,3398
42
42
  warp_beacon/storage/mongo.py,sha256=qC4ZiO8XXvPnP0rJwz4CJx42pqFsyAjCiW10W5QdT6E,527
43
43
  warp_beacon/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
- warp_beacon/telegram/bot.py,sha256=W13hyJD89ozZallLq0NIb9c3uh1Hov8Axi7ab7LkE3A,19128
44
+ warp_beacon/telegram/bot.py,sha256=HJxouCxc85EzC8lTaqnP-5agvkdvlxKR6Etg5LjYcoA,19212
45
45
  warp_beacon/telegram/caption_shortener.py,sha256=EnguNCF52ne7y4P-iJAbI6K3sqoJqJbND_dX5Fhwkv0,1549
46
46
  warp_beacon/telegram/download_status.py,sha256=JNevX0VQh39fX98fjM9j_nm0Ribj8f3tfa6kxpeNapQ,1484
47
47
  warp_beacon/telegram/edit_message.py,sha256=6DX8eJV70MG_b79WbuJG55qLBs66boElzYdCr8zpMeI,5380
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
- warp_beacon/telegram/progress_bar.py,sha256=VBF_qwjOCu0mXN-r_Us4M7qoDWoyvjrw2R2TLgFvTKM,4858
50
+ warp_beacon/telegram/progress_bar.py,sha256=uPJ5PKjqIzqithehptP5YLFt_sCuPXDZIBaakamkLTg,4871
51
51
  warp_beacon/telegram/progress_file_reader.py,sha256=e3equyNKlKs764AD-iE9QRsh3YDHTzP78Mx5tdvPPWs,969
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.100.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
- warp_beacon-2.6.100.dist-info/METADATA,sha256=FHBvQUqkWovkovYBPeCEjB6cNwIGkAfXyi7RcrVnkx4,23216
57
- warp_beacon-2.6.100.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
58
- warp_beacon-2.6.100.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
59
- warp_beacon-2.6.100.dist-info/top_level.txt,sha256=5YQRN46STNg81V_3jdzZ6bftkMxhe1hTPSFvJugDu84,1405
60
- warp_beacon-2.6.100.dist-info/RECORD,,
55
+ warp_beacon-2.7.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
+ warp_beacon-2.7.1.dist-info/METADATA,sha256=ANPUm5xJ5QLtbGYkpgn7cF1hh9yjBFZ_4Y7i959sBkw,23214
57
+ warp_beacon-2.7.1.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
58
+ warp_beacon-2.7.1.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
59
+ warp_beacon-2.7.1.dist-info/top_level.txt,sha256=5YQRN46STNg81V_3jdzZ6bftkMxhe1hTPSFvJugDu84,1405
60
+ warp_beacon-2.7.1.dist-info/RECORD,,