warp-beacon 2.2.57__py3-none-any.whl → 2.2.59__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.2.57"
1
+ __version__ = "2.2.59"
2
2
 
@@ -33,8 +33,7 @@ class YoutubeMusicScraper(YoutubeAbstract):
33
33
  max_retries=0,
34
34
  timeout=timeout,
35
35
  skip_existing=False,
36
- filename_prefix='yt_download_',
37
- mp3=True
36
+ filename_prefix='yt_download_'
38
37
  )
39
38
  logging.debug("Temp filename: '%s'", local_file)
40
39
  res.append({
@@ -74,6 +74,8 @@ class Handlers(object):
74
74
  else:
75
75
  for url in urls:
76
76
  origin = Utils.extract_origin(url)
77
+ if origin is Origin.INSTAGRAM:
78
+ url = Utils.convert_ig_share_link(url)
77
79
  if origin is Origin.YOUTU_BE:
78
80
  url = Utils.extract_youtu_be_link(url)
79
81
  if not url:
@@ -2,6 +2,7 @@ from typing import Union
2
2
 
3
3
  import re
4
4
  import requests
5
+ from urllib.parse import urlparse
5
6
 
6
7
  from pyrogram.types import Message
7
8
 
@@ -57,6 +58,22 @@ class Utils(object):
57
58
  logging.exception(e)
58
59
 
59
60
  return ''
61
+
62
+ @staticmethod
63
+ def convert_ig_share_link(url: str) -> str:
64
+ # expected url: https://www.instagram.com/share/reel/BAHtk2AamB
65
+ # result url: https://www.instagram.com/reel/DAKjQgUNzuH/
66
+ try:
67
+ if "instagram.com/" in url and "share" in url and "reel" in url:
68
+ reel_id = urlparse(url).path.split[-1]
69
+ new_url = f'https://www.instagram.com/reel/{reel_id}/'
70
+ logging.info("Converted IG share link to '%s'", new_url)
71
+ return new_url
72
+ except Exception as e:
73
+ logging.error("Failed to convert IG share link!")
74
+ logging.exception(e)
75
+
76
+ return url
60
77
 
61
78
  @staticmethod
62
79
  def parse_expected_patronum_error(err_text: str) -> tuple:
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: warp_beacon
3
- Version: 2.2.57
3
+ Version: 2.2.59
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
7
7
  Author-email: "Andrey (Sb0y) Bagrintsev" <andrey@bagrintsev.me>
8
- License: Apache License
8
+ License: Apache License
9
9
  Version 2.0, January 2004
10
10
  http://www.apache.org/licenses/
11
11
 
@@ -231,11 +231,11 @@ Requires-Dist: tgcrypto
231
231
  Requires-Dist: pyrogram
232
232
  Requires-Dist: pillow-heif
233
233
  Requires-Dist: pytubefix
234
- Requires-Dist: av ==12.3.0
234
+ Requires-Dist: av==12.3.0
235
235
  Requires-Dist: urlextract
236
236
  Requires-Dist: pillow
237
237
  Requires-Dist: pymongo
238
- Requires-Dist: instagrapi ==2.0.0
238
+ Requires-Dist: instagrapi==2.0.0
239
239
 
240
240
  # warp_beacon [![Upload Python Package](https://github.com/sb0y/warp_beacon/actions/workflows/python-publish.yml/badge.svg)](https://github.com/sb0y/warp_beacon/actions/workflows/python-publish.yml) [![Docker Image CI](https://github.com/sb0y/warp_beacon/actions/workflows/docker-image.yml/badge.svg)](https://github.com/sb0y/warp_beacon/actions/workflows/docker-image.yml) [![Build DEB package](https://github.com/sb0y/warp_beacon/actions/workflows/build-deb.yml/badge.svg)](https://github.com/sb0y/warp_beacon/actions/workflows/build-deb.yml)
241
241
 
@@ -3,7 +3,7 @@ lib/systemd/system/warp_beacon.service,sha256=lPmHqLqcI2eIV7nwHS0qcALQrznixqJuww
3
3
  var/warp_beacon/accounts.json,sha256=2QQMS9N_Z-TnfZq4U1vSUe4IKyZGmTFdgo8BoF4hQ7E,1710
4
4
  var/warp_beacon/placeholder.gif,sha256=cE5CGJVaop4Sx21zx6j4AyoHU0ncmvQuS2o6hJfEH88,6064
5
5
  warp_beacon/__init__.py,sha256=_rThNODmz0nDp_n4mWo_HKaNFE5jk1_7cRhHyYaencI,163
6
- warp_beacon/__version__.py,sha256=YkcKYAwIvyRW9eN6ye8z40n3gVaHKkhv9z86AbStvRY,24
6
+ warp_beacon/__version__.py,sha256=3gIF5ZiSoycCD0uaK8jM1O1THJi-NB2FPt8jZyxZf4o,24
7
7
  warp_beacon/warp_beacon.py,sha256=7KEtZDj-pdhtl6m-zFLsSojs1ZR4o7L0xbqtdmYPvfE,342
8
8
  warp_beacon/compress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  warp_beacon/compress/video.py,sha256=_PDMVYCyzLYxHv1uZmmzGcG_8rjaZr7BTXsXTTy_oS4,2846
@@ -27,19 +27,19 @@ warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
27
27
  warp_beacon/scraper/instagram/instagram.py,sha256=m2bAqLu-_HchlF5CVZDlytB9cFGxrN7EEbQW-G1f5u4,12857
28
28
  warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  warp_beacon/scraper/youtube/abstract.py,sha256=LqQRNjWY1S44nGvthuinnaRvyAKHfDwnIoMqSoj_EaA,8765
30
- warp_beacon/scraper/youtube/music.py,sha256=nbTDFdgXGbTNqttE828DEgvSc8-SuAsQAHeqUwU6yFM,1484
30
+ warp_beacon/scraper/youtube/music.py,sha256=LzpnRVL0sa1S5KDy0C5iMwNPPXZnXhIrEUxFX2ro06c,1471
31
31
  warp_beacon/scraper/youtube/shorts.py,sha256=WMjStmQz24zJwpzGak4-UuaVLo4-0hPtH_rAHQWgKdU,1322
32
32
  warp_beacon/scraper/youtube/youtube.py,sha256=JvN5pVz0jtxCY9FGMl1dIg5Ccr2Kulaoxtym0Vb1QwQ,2224
33
33
  warp_beacon/storage/__init__.py,sha256=m86MDXBMtZZsTPLI2cD-pM5Xkh2g2NYVvp_dtW8eH0Q,3548
34
34
  warp_beacon/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  warp_beacon/telegram/bot.py,sha256=MONqsxLMJk3jnLFpn1Nfj5w-FSxPNS2Fx9QfaK2S5lw,15446
36
- warp_beacon/telegram/handlers.py,sha256=SyYSDYbHnMpXDqockHTN-8Rg_YimLDfJAOhuubQfyUo,7183
36
+ warp_beacon/telegram/handlers.py,sha256=3VgD719pgJqu46zatL_0M_KzuoIUkW7FYMyLjb0YzaM,7262
37
37
  warp_beacon/telegram/placeholder_message.py,sha256=N1fSL1xbFLF5alhnEvk-xbf3v2A_nLWg6xHtVZTaoiA,6396
38
- warp_beacon/telegram/utils.py,sha256=wSyJJsv1chaK4hqnBP-dDiY1hYD7wFhzBzw5H_AwE88,2450
38
+ warp_beacon/telegram/utils.py,sha256=9wm8wy4q99FX5cDfiKs_Yrst5aD0pNTDCX0Y-mBy558,3045
39
39
  warp_beacon/uploader/__init__.py,sha256=rbfsm_eYcfsBRkiaG0glVgBNtQCEe7cVQTWEIAHz5aw,4763
40
- warp_beacon-2.2.57.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
41
- warp_beacon-2.2.57.dist-info/METADATA,sha256=-kjLLJDKeL_RWYAGnF7-TSxwicVIvOgLCDrrJmGLj14,21272
42
- warp_beacon-2.2.57.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
43
- warp_beacon-2.2.57.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
44
- warp_beacon-2.2.57.dist-info/top_level.txt,sha256=ALb_Ft_eG-OY4_m0TWUifNUOZsrx483L-zw7G7vqXoc,971
45
- warp_beacon-2.2.57.dist-info/RECORD,,
40
+ warp_beacon-2.2.59.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
41
+ warp_beacon-2.2.59.dist-info/METADATA,sha256=1zUJdv19810AjGJUrGjXkfMdh5sZJV0ML_I58nfX_9k,21303
42
+ warp_beacon-2.2.59.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
43
+ warp_beacon-2.2.59.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
44
+ warp_beacon-2.2.59.dist-info/top_level.txt,sha256=ALb_Ft_eG-OY4_m0TWUifNUOZsrx483L-zw7G7vqXoc,971
45
+ warp_beacon-2.2.59.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5