mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-02 08:08:44 +02:00
[elonet] Rewrite extractor (#3277)
Closes #2911 Authored by: Fam0r, pukkandan
This commit is contained in:
parent
dc57e74a7f
commit
fbfde1c3e6
2 changed files with 34 additions and 55 deletions
|
@ -1297,8 +1297,8 @@ class InfoExtractor(object):
|
|||
@staticmethod
|
||||
def _og_regexes(prop):
|
||||
content_re = r'content=(?:"([^"]+?)"|\'([^\']+?)\'|\s*([^\s"\'=<>`]+?))'
|
||||
property_re = (r'(?:name|property)=(?:\'og[:-]%(prop)s\'|"og[:-]%(prop)s"|\s*og[:-]%(prop)s\b)'
|
||||
% {'prop': re.escape(prop)})
|
||||
property_re = (r'(?:name|property)=(?:\'og%(sep)s%(prop)s\'|"og%(sep)s%(prop)s"|\s*og%(sep)s%(prop)s\b)'
|
||||
% {'prop': re.escape(prop), 'sep': '(?::|[:-])'})
|
||||
template = r'<meta[^>]+?%s[^>]+?%s'
|
||||
return [
|
||||
template % (property_re, content_re),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue