[extractor/tumblr] fix exception if no <title> html tag

This commit is contained in:
Lauren N. Liberda 2023-07-05 22:15:17 +02:00
parent f4ba2275f2
commit 7a1f3a1c70
No known key found for this signature in database
GPG key ID: 734C629FD04BD319

View file

@ -449,7 +449,7 @@ def _real_extract(self, url):
info_dict = {
'id': video_id,
'title': post_json.get('summary') or (blog if api_only else self._html_search_regex(
r'(?s)<title>(?P<title>.*?)(?: \| Tumblr)?</title>', webpage, 'title')),
r'(?s)<title>(?P<title>.*?)(?: \| Tumblr)?</title>', webpage, 'title', default=blog)),
'description': description,
'uploader_id': uploader_id,
'uploader_url': f'https://{uploader_id}.tumblr.com/' if uploader_id else None,