mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 23:24:49 +00:00
[extractor] Allow extracting multiple groups in _search_regex
From #497, Authored by: fstirlitz
This commit is contained in:
parent
c888ffb95a
commit
198f7ea89e
1 changed files with 2 additions and 0 deletions
|
@ -1111,6 +1111,8 @@ class InfoExtractor(object):
|
|||
if group is None:
|
||||
# return the first matching group
|
||||
return next(g for g in mobj.groups() if g is not None)
|
||||
elif isinstance(group, (list, tuple)):
|
||||
return tuple(mobj.group(g) for g in group)
|
||||
else:
|
||||
return mobj.group(group)
|
||||
elif default is not NO_DEFAULT:
|
||||
|
|
Loading…
Reference in a new issue