Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/tumblr.py (Python)

Code before:
            return self.url_result(iframe_url or redirect_url, 'Generic')

        formats = formats or [{
            'url': media_json.get('url', video_url),
            'format_id': '0',
            'width': media_json.get('width', int_or_none(
                self._og_search_property('video:width', webpage, default=None))),
            'height': media_json.get('height', int_or_none(
                self._og_search_property('video:height', webpage, default=None))),
        }]
        self._sort_formats(formats)

        # the url we're extracting from might be an original post or it might be a reblog.
        # if it's a reblog, og:description will be the reblogger's comment, not the uploader's.
        # content_json is the op's post, so if it exists but has no text, there's no description
        description = ('\n\n'.join(
            (item.get('text') for item in content_json if item.get('type') == 'text'))
            or (None if content_json else self._og_search_description(webpage, default=None)))
        uploader_id = traverse_obj(post_json, ('reblogged_root_name'), ('blog_name'))

        return {
            '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'))),
            'description': description,
            'thumbnail': (traverse_obj(video_json, ('poster', 0, 'url'))
                          or self._og_search_thumbnail(webpage, default=None)),
            'uploader_id': uploader_id,
            'uploader_url': f'https://{uploader_id}.tumblr.com/' if uploader_id else None,
            'duration': duration,
            'like_count': post_json.get('like_count'),
            'repost_count': post_json.get('reblog_count'),
            'age_limit': ((18 if post_json.get('is_nsfw') else 0)
                          if 'is_nsfw' in post_json else None),
            'tags': post_json.get('tags'),
            'formats': formats,
        }


Review comment (suggestion):

```suggestion
            'title': post_json.get('summary') or (blog if api_only else self._html_search_regex(
                r'(?s)<title>(?P<title>.*?)(?: \| Tumblr)?</title>', webpage, 'title'))),
```

Code after:
            'width': int_or_none(
                media_json.get('width') or self._og_search_property('video:width', webpage, default=None)),
            'height': int_or_none(
                media_json.get('height') or self._og_search_property('video:height', webpage, default=None)),
        }]
        self._sort_formats(formats)

        # the url we're extracting from might be an original post or it might be a reblog.
        # if it's a reblog, og:description will be the reblogger's comment, not the uploader's.
        # content_json is always the op, so if it exists but has no text, there's no description
        if content_json:
            description = '\n\n'.join((
                item.get('text') for item in content_json if item.get('type') == 'text')) or None
        else:
            description = self._og_search_description(webpage, default=None)
        uploader_id = traverse_obj(post_json, 'reblogged_root_name', 'blog_name')

        return {
            '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')),
            'description': description,
            'thumbnail': (traverse_obj(video_json, ('poster', 0, 'url'))
                          or self._og_search_thumbnail(webpage, default=None)),
            'uploader_id': uploader_id,
            'uploader_url': f'https://{uploader_id}.tumblr.com/' if uploader_id else None,
            'duration': duration,
            'like_count': post_json.get('like_count'),
            'repost_count': post_json.get('reblog_count'),
            'age_limit': {True: 18, False: 0}.get(post_json.get('is_nsfw')),
            'tags': post_json.get('tags'),
            'formats': formats,
        }