[imgur] prefer og:video

This commit is contained in:
Mort Yao 2022-01-05 22:10:50 +01:00
parent 884b56e5fa
commit d92e1aacd1
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -52,7 +52,8 @@ class Imgur(VideoExtractor):
else: else:
# gallery image # gallery image
content = get_content(self.url) content = get_content(self.url)
url = match1(content, r'meta property="og:image"[^>]+(https?://i.imgur.com/[^"?]+)') url = match1(content, r'meta property="og:video"[^>]+(https?://i.imgur.com/[^"?]+)') or \
match1(content, r'meta property="og:image"[^>]+(https?://i.imgur.com/[^"?]+)')
_, container, size = url_info(url) _, container, size = url_info(url)
self.streams = { self.streams = {
'original': { 'original': {