diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py index 3d14925b6..047398cc1 100644 --- a/yt_dlp/extractor/twitter.py +++ b/yt_dlp/extractor/twitter.py @@ -1229,11 +1229,12 @@ def _extract_status(self, twid): raise self.report_warning( f'{e.orig_msg}. Falling back to syndication endpoint; some metadata may be missing', twid) - status = self._download_json( - 'https://cdn.syndication.twimg.com/tweet-result', twid, 'Downloading syndication JSON', - headers={'User-Agent': 'Googlebot'}, query={'id': twid}) - status['extended_entities'] = {'media': status.get('mediaDetails')} - return status + + status = self._download_json( + 'https://cdn.syndication.twimg.com/tweet-result', twid, 'Downloading syndication JSON', + headers={'User-Agent': 'Googlebot'}, query={'id': twid}) + status['extended_entities'] = {'media': status.get('mediaDetails')} + return status def _real_extract(self, url): twid, selected_index = self._match_valid_url(url).group('id', 'index')