warp-beacon 2.8.0__py3-none-any.whl → 2.8.2__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.8.0"
1
+ __version__ = "2.8.2"
2
2
 
@@ -57,6 +57,7 @@ class XScraper(XAbstract):
57
57
  'noplaylist': True,
58
58
  'merge_output_format': 'mp4',
59
59
  'dump_single_json': True,
60
+ 'nocheckcertificate': True,
60
61
  }
61
62
 
62
63
  if self.proxy:
@@ -74,14 +75,20 @@ class XScraper(XAbstract):
74
75
  local_file = self.download_video(url, ydl, media_info)
75
76
  post_text = self.extract_canonical_name(media_info)
76
77
  job_type = JobType.VIDEO
77
- except yt_dlp.utils.DownloadError:
78
- logging.warning("[X] yt_dlp failed to extract info. Falling back to image scraping.")
79
- media_type = XMediaType.IMAGE
78
+ except yt_dlp.utils.DownloadError as e:
79
+ msg = str(e).lower()
80
+ if "no video could be found in this tweet" in msg:
81
+ logging.warning("[X] yt_dlp failed to extract info. Falling back to image scraping.")
82
+ media_type = XMediaType.IMAGE
83
+ else:
84
+ raise
80
85
 
81
86
  if media_type == XMediaType.IMAGE:
82
87
  job_type = JobType.IMAGE
83
88
  images, post_text = self.download_images(url, timeout)
84
89
  if images:
90
+ #if len(images) > 1:
91
+ # job_type = JobType.COLLECTION
85
92
  local_file = images[0]
86
93
 
87
94
  if local_file:
@@ -193,7 +200,7 @@ class XScraper(XAbstract):
193
200
 
194
201
  with sync_playwright() as p:
195
202
  with p.chromium.launch(headless=True) as browser:
196
- with browser.new_context(proxy=proxy) as context:
203
+ with browser.new_context(proxy=proxy, ignore_https_errors=True) as context:
197
204
  page = context.new_page()
198
205
  page.goto(url, wait_until="networkidle", timeout=(timeout*1000))
199
206
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warp_beacon
3
- Version: 2.8.0
3
+ Version: 2.8.2
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=RjXhwC6LzQhy5Jq8-3EwaS2mfILY1I_5cUzqD1L3sIk,23
7
+ warp_beacon/__version__.py,sha256=_SZLUMceWXLlOgtC4XoBV-qybNYGrvvvBX_c96Do1fM,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
@@ -29,7 +29,7 @@ warp_beacon/scraper/exceptions.py,sha256=EKwoF0oH2xZWbNU-v8DOaWK5skKwa3s1yTIBdlc
29
29
  warp_beacon/scraper/fail_handler.py,sha256=5ODu4b8ndZWAcHIXrcUufsWFihetzNUoAi8IgAkreyQ,998
30
30
  warp_beacon/scraper/link_resolver.py,sha256=Rc9ZuMyOo3iPywDHwjngy-WRQ2SXhJwxcg-5ripx7tM,2447
31
31
  warp_beacon/scraper/utils.py,sha256=AOZmDki2Pbr84IG-j_wN2UghKCiWFVDYdx6HJl0JTBs,1258
32
- warp_beacon/scraper/X/X.py,sha256=QZmVeYfKJU-IvXWVvu2dUXroBpt4WFsqj1thIlYdF44,6620
32
+ warp_beacon/scraper/X/X.py,sha256=iS_24pYTXKArcHy6XJVJgu6w9sicsHSgREyn6ZuB8YI,6846
33
33
  warp_beacon/scraper/X/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  warp_beacon/scraper/X/abstract.py,sha256=Mmz69rQ0LTzQZkPCjrvdj2YbKfavXU8d1GujDv8VJmo,5475
35
35
  warp_beacon/scraper/X/types.py,sha256=i36Nu2cHpHCkvoeobBQC3B13Ke_N40tgCCApcm_FBFY,76
@@ -56,9 +56,9 @@ warp_beacon/telegram/progress_file_reader.py,sha256=e3equyNKlKs764AD-iE9QRsh3YDH
56
56
  warp_beacon/telegram/types.py,sha256=Kvdng6uCF1HRoqQgGW1ZYYPJoVuYkFb-LDvMBbW5Hjk,89
57
57
  warp_beacon/telegram/utils.py,sha256=zTF8VQfAWetBSjAPbmNe_Zi_LN5fAcWptJKjLaFNHaE,5073
58
58
  warp_beacon/uploader/__init__.py,sha256=1enK6qMWaTZEaK456JwaKOfvCvznHA8cjgceOsrF6Po,5732
59
- warp_beacon-2.8.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
60
- warp_beacon-2.8.0.dist-info/METADATA,sha256=jCewLr41B38jkthfZ7ZQj-ddAzE_QNsqFFM2jhQat6U,23214
61
- warp_beacon-2.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
62
- warp_beacon-2.8.0.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
63
- warp_beacon-2.8.0.dist-info/top_level.txt,sha256=RraB0PWGvRK2zPYkuICKNgStLG1C5s7rPHHJEHJbkgA,1510
64
- warp_beacon-2.8.0.dist-info/RECORD,,
59
+ warp_beacon-2.8.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
60
+ warp_beacon-2.8.2.dist-info/METADATA,sha256=8gbtqun7YoGc-aolBKe1_nSz0q52KZEhNU3xErMZECg,23214
61
+ warp_beacon-2.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
62
+ warp_beacon-2.8.2.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
63
+ warp_beacon-2.8.2.dist-info/top_level.txt,sha256=RraB0PWGvRK2zPYkuICKNgStLG1C5s7rPHHJEHJbkgA,1510
64
+ warp_beacon-2.8.2.dist-info/RECORD,,