mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-19 21:04:01 -07:00
[YouTube] Support Releases tab
This commit is contained in:
parent
211cbfd5d4
commit
64d6dd64c8
2 changed files with 74 additions and 49 deletions
|
@ -3753,6 +3753,11 @@ def strip_or_none(v, default=None):
|
|||
return v.strip() if isinstance(v, compat_str) else default
|
||||
|
||||
|
||||
def txt_or_none(v, default=None):
|
||||
""" Combine str/strip_or_none, disallow blank value (for traverse_obj) """
|
||||
return default if v is None else (compat_str(v).strip() or default)
|
||||
|
||||
|
||||
def url_or_none(url):
|
||||
if not url or not isinstance(url, compat_str):
|
||||
return None
|
||||
|
@ -4096,8 +4101,8 @@ def escape_url(url):
|
|||
).geturl()
|
||||
|
||||
|
||||
def parse_qs(url):
|
||||
return compat_parse_qs(compat_urllib_parse.urlparse(url).query)
|
||||
def parse_qs(url, **kwargs):
|
||||
return compat_parse_qs(compat_urllib_parse.urlparse(url).query, **kwargs)
|
||||
|
||||
|
||||
def read_batch_urls(batch_fd):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue