[extractor] Improve _generic_title
This commit is contained in:
parent
682b4524bf
commit
62b8dac490
16 changed files with 21 additions and 34 deletions
|
|
@ -3820,9 +3820,11 @@ class InfoExtractor:
|
|||
def _generic_id(url):
|
||||
return urllib.parse.unquote(os.path.splitext(url.rstrip('/').split('/')[-1])[0])
|
||||
|
||||
@staticmethod
|
||||
def _generic_title(url):
|
||||
return urllib.parse.unquote(os.path.splitext(url_basename(url))[0])
|
||||
def _generic_title(self, url='', webpage='', *, default=None):
|
||||
return (self._og_search_title(webpage, default=None)
|
||||
or self._html_extract_title(webpage, default=None)
|
||||
or urllib.parse.unquote(os.path.splitext(url_basename(url))[0])
|
||||
or default)
|
||||
|
||||
@staticmethod
|
||||
def _availability(is_private=None, needs_premium=None, needs_subscription=None, needs_auth=None, is_unlisted=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue