mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 15:46:54 +01:00
Use re.DOTALL by default when searching OpenGraph properties
This commit is contained in:
parent
46720279c2
commit
44dbe89035
@ -265,7 +265,7 @@ def _og_regex(property):
|
|||||||
def _og_search_property(self, property, html, name=None, **kargs):
|
def _og_search_property(self, property, html, name=None, **kargs):
|
||||||
if name is None:
|
if name is None:
|
||||||
name = 'OpenGraph %s' % property
|
name = 'OpenGraph %s' % property
|
||||||
return self._html_search_regex(self._og_regex(property), html, name, **kargs)
|
return self._html_search_regex(self._og_regex(property), html, name, flags=re.DOTALL, **kargs)
|
||||||
|
|
||||||
def _og_search_thumbnail(self, html, **kargs):
|
def _og_search_thumbnail(self, html, **kargs):
|
||||||
return self._og_search_property('image', html, 'thumbnail url', fatal=False, **kargs)
|
return self._og_search_property('image', html, 'thumbnail url', fatal=False, **kargs)
|
||||||
|
@ -32,6 +32,6 @@ def _real_extract(self, url):
|
|||||||
'url': video_url,
|
'url': video_url,
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': self._og_search_description(webpage, flags=re.DOTALL),
|
'description': self._og_search_description(webpage),
|
||||||
}
|
}
|
||||||
return [info]
|
return [info]
|
||||||
|
Loading…
Reference in New Issue
Block a user