warp-beacon 2.7.14__py3-none-any.whl → 2.7.16__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.7.14"
1
+ __version__ = "2.7.16"
2
2
 
@@ -340,7 +340,7 @@ class YoutubeAbstract(ScraperAbstract):
340
340
 
341
341
  yt_dlp_cookies_file = os.environ.get("YT_DLP_COOKIES_FILE", default="/var/warp_beacon/yt_dlp_cookies.txt")
342
342
  if yt_dlp_cookies_file and os.path.exists(yt_dlp_cookies_file):
343
- ydl_opts['cookiesfrombrowser'] = tuple(s.strip() for s in os.environ.get("YT_DLP_COOKIES_FROM_BROWSER", default='chrome').split(','))
343
+ #ydl_opts['cookiesfrombrowser'] = tuple(s.strip() for s in os.environ.get("YT_DLP_COOKIES_FROM_BROWSER", default='chrome').split(','))
344
344
  ydl_opts['cookiefile'] = yt_dlp_cookies_file
345
345
 
346
346
  if self.proxy:
@@ -141,11 +141,15 @@ class YoutubeScraper(YoutubeAbstract):
141
141
 
142
142
  dl_format = {}
143
143
  for f in sorted(formats, key=lambda x: (x.get('height', 0) or 0), reverse=True):
144
+ logging.info("Format: %s, ext=%s, height=%s, acodec=%s, vcodec=%s",
145
+ f.get('format_id'), f.get('ext'), f.get('height'),
146
+ f.get('acodec'), f.get('vcodec'))
144
147
  if f.get('vcodec', '') != 'none' and f.get('acodec', '') != 'none' and f.get('ext', '') == 'mp4':
145
148
  dl_format = f
146
149
  break
147
150
 
148
151
  filesize = dl_format.get('filesize', 0) or dl_format.get('filesize_approx', 0)
152
+ logging.info("[yt_dlp] File size '%d'", filesize)
149
153
  if filesize:
150
154
  if filesize > 2147483648: # 2 GiB
151
155
  logging.warning("Max resolution exceeding TG limits")
@@ -158,6 +162,11 @@ class YoutubeScraper(YoutubeAbstract):
158
162
  break
159
163
  else:
160
164
  logging.warning("Unknown filesize!")
165
+ if not dl_format:
166
+ for f in sorted(formats, key=lambda x: x.get('height', 0), reverse=True):
167
+ if f.get('vcodec') != 'none' and f.get('acodec') != 'none':
168
+ dl_format = f
169
+ break
161
170
  ydl.params['format'] = dl_format['format_id']
162
171
  ydl.download([url])
163
172
  local_file = ydl.prepare_filename(info)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warp_beacon
3
- Version: 2.7.14
3
+ Version: 2.7.16
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=mpw1HxsCJ1pXaTGHkZeD3BsMPBVilbvCxhLFQCw9fGU,24
7
+ warp_beacon/__version__.py,sha256=iot90l0yxUGtwyAwpNXT6lGmpv4GTzZTiGfTAwv87q4,24
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
@@ -34,10 +34,10 @@ warp_beacon/scraper/instagram/captcha.py,sha256=9UYziuqB3Tsat_ET6ex-cnZDbi6yCnsX
34
34
  warp_beacon/scraper/instagram/instagram.py,sha256=oVXP6VweJCeffhyDU-GZLa66ESW06GvfuGcW2V6YdQ4,18629
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=sR7YY-MecokezNeE_Fmf-t1cbcbXKPcjeeDnPU2fDHM,16235
37
+ warp_beacon/scraper/youtube/abstract.py,sha256=-H1AFMJD9w1GmVDTuJKGsFTrgrctdRcgTTrXM2OhLjE,16236
38
38
  warp_beacon/scraper/youtube/music.py,sha256=5AeSBQyUgVCJT2hoBCV2WvlyuV9US09SYJhmBG_P9F8,2755
39
39
  warp_beacon/scraper/youtube/shorts.py,sha256=y0591kpWU35rt5OoWamkcHIstNZ98SXUlUKvYmUsyEY,4030
40
- warp_beacon/scraper/youtube/youtube.py,sha256=i-3Z5l3S-EltIFbxkbvDjXMgH8fGOrB5-ua1p6iH_Bc,6316
40
+ warp_beacon/scraper/youtube/youtube.py,sha256=uYR7XpfP6ZnSvw1Gc4qG_M8jkCyv3maEytFdNWlYPwU,6732
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
@@ -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=S1N_JbHM_ExiM5tS0CeYKWIlvaJMlyq85TQNbK_GVds,5029
54
54
  warp_beacon/uploader/__init__.py,sha256=ewvR60k9osJxw_kb5U-TlZkCGR_574biq3w_aR1tjIU,5689
55
- warp_beacon-2.7.14.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
- warp_beacon-2.7.14.dist-info/METADATA,sha256=iEp0LGBP8FDFhxbzXpjzgrCPbi8_r4T5eW-vYmvFZaI,23215
57
- warp_beacon-2.7.14.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
58
- warp_beacon-2.7.14.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
59
- warp_beacon-2.7.14.dist-info/top_level.txt,sha256=5YQRN46STNg81V_3jdzZ6bftkMxhe1hTPSFvJugDu84,1405
60
- warp_beacon-2.7.14.dist-info/RECORD,,
55
+ warp_beacon-2.7.16.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
+ warp_beacon-2.7.16.dist-info/METADATA,sha256=-tdN3X0fWfgGZ5IzeEIddErRI0KS5OaX076Wo1Gk4HA,23215
57
+ warp_beacon-2.7.16.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
58
+ warp_beacon-2.7.16.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
59
+ warp_beacon-2.7.16.dist-info/top_level.txt,sha256=5YQRN46STNg81V_3jdzZ6bftkMxhe1hTPSFvJugDu84,1405
60
+ warp_beacon-2.7.16.dist-info/RECORD,,