Repository: yt-dlp
Issue: Twitter/X: Unpredictable behaviour following links in Tweets
Labels: site-bug,patch-available

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

Germany

### Provide a description that is worded well enough to be understood

When grabbing metadata from Twitter in Tweets with links, the extractor tries to follow the link source. This is not consistent, though. Consider these examples:

## Tweet by YouTube without link
Works as expected.

```
~ » yt-dlp --ignore-no-formats-error --print-json --no-warnings "https://twitter.com/YouTube/status/1780725427520065913"                                                                       2 ↵ user@ufe59-leon
{"id": "1780725427520065913", "title": "YouTube - who's your favorite aries creator??", "description": "who's your favorite aries creator??", "uploader": "YouTube", "timestamp": 1713393000.0, "channel_id": "10228272", "uploader_id": "YouTube", "uploader_url": "https://twitter.com/YouTube", "like_count": 556, "repost_count": 45, "comment_count": 246, "age_limit": 0, "tags": [], "webpage_url": "https://twitter.com/YouTube/status/1780725427520065913", "original_url": "https://twitter.com/YouTube/status/1780725427520065913", "webpage_url_basename": "1780725427520065913", "webpage_url_domain": "twitter.com", "extractor": "twitter", "extractor_key": "Twitter", "playlist": null, "playlist_index": null, "display_id": "1780725427520065913", "fulltitle": "YouTube - who's your favorite aries creator??", "upload_date": "20240417", "release_year": null, "requested_subtitles": null, "_has_drm": null, "formats": [], "epoch": 1713434209, "_filename": "10228272_1780725427520065913_YouTube - who's your favorite aries creator\uff1f\uff1f", "filename": "10228272_1780725427520065913_YouTube - who's your favorite aries creator\uff1f\uff1f", "_type": "video", "_version": {"version": "2024.04.09", "current_git_head": null, "release_git_head": "ff07792676f404ffff6ee61b5638c9dc1a33a37a", "repository": "yt-dlp/yt-dlp"}}
ERROR: [twitter] 1780725427520065913: No video formats found!
```

## Tweet by YouTube linking to https://yt.be/coachella
This follows the video link and starts printing JSON data from the video.

```
~ » yt-dlp --ignore-no-formats-error --print-json --no-warnings "https://twitter.com/YouTube/status/1779652587232673918"                                                                       1 ↵ user@ufe59-leon
{"id": "iYPwEzMm8i4", "title": "Coachella Stage - Live from Coachella 2024", "formats": [], "thumbnails": [{"url": "https://i.ytimg.com/vi/iYPwEzMm8i4/3.jpg", "preference": -37, "id": "0"}, ...
```

## Tweet by GoogleDoodles linking to https://goo.gle/3UeSqTx
This errors out and does not return metadata.

```
~ » yt-dlp --ignore-no-formats-error --print-json --no-warnings "https://twitter.com/GoogleDoodles/status/1779857206218756571"                                                                 1 ↵ user@ufe59-leon
ERROR: Unsupported URL: https://doodles.google/doodle/celebrating-etel-adnan/
```

## Tweet by Meta linking to https://about.fb.com/news/2024/01/teen-protections-age-appropriate-experiences-on-our-apps/
In contrast to the above example, this works fine, even though the linked site does not contain a video.

```
~ » yt-dlp --ignore-no-formats-error --print-json --no-warnings "https://twitter.com/Meta/status/1744850188416528392"                                                                          1 ↵ user@ufe59-leon
{"id": "1744850188416528392", "title": "Meta - New year, new upgrades! We\u2019re kicking off 2024 by leveling up our features to keep teens safe from sensitive content online \ud83d\udc49  Know a friend who could use this info? Tag them in the comments below!", "description": "New year, new upgrades! We\u2019re kicking off 2024 by leveling up our features to keep teens safe from sensitive content online \ud83d\udc49 https://t.co/fSH4GFL7Yy  Know a friend who could use this info? Tag them in the comments below!", "uploader": "Meta", "timestamp": 1704839677.0, "channel_id": "2425151", "uploader_id": "Meta", "uploader_url": "https://twitter.com/Meta", "like_count": 266, "repost_count": 81, "comment_count": 234, "age_limit": 0, "tags": [], "formats": [], "subtitles": {}, "thumbnails": [], "display_id": "1744850188416528392", "_old_archive_ids": ["twitter 1744850188416528392"], "webpage_url": "https://twitter.com/Meta/status/1744850188416528392", "original_url": "https://twitter.com/Meta/status/1744850188416528392", "webpage_url_basename": "1744850188416528392", "webpage_url_domain": "twitter.com", "extractor": "twitter", "extractor_key": "Twitter", "playlist": null, "playlist_index": null, "fulltitle": "Meta - New year, new upgrades! We\u2019re kicking off 2024 by leveling up our features to keep teens safe from sensitive content online \ud83d\udc49  Know a friend who could use this info? Tag them in the comments below!", "upload_date": "20240109", "release_year": null, "requested_subtitles": null, "_has_drm": null, "epoch": 1713434288, "_filename": "2425151_1744850188416528392_Meta - New year, new upgrades! We\u2019re kicking off 2024 by leveling up our features to keep teens safe from sensitive content online \ud83d\udc49  Know a friend who could use this info\uff1f Tag them in the comments below!", "filename": "2425151_1744850188416528392_Meta - New year, new upgrades! We\u2019re kicking off 2024 by leveling up our features to keep teens safe from sensitive content online \ud83d\udc49  Know a friend who could use this info\uff1f Tag them in the comments below!", "_type": "video", "_version": {"version": "2024.04.09", "current_git_head": null, "release_git_head": "ff07792676f404ffff6ee61b5638c9dc1a33a37a", "repository": "yt-dlp/yt-dlp"}}
ERROR: [twitter] 1744850188416528392: No video formats found!
```

The link itself does throw an error:
```
~ » yt-dlp --ignore-no-formats-error --print-json --no-warnings "https://about.fb.com/news/2024/01/teen-protections-age-appropriate-experiences-on-our-apps/"                                  1 ↵ user@ufe59-leon
ERROR: Unsupported URL: https://about.fb.com/news/2024/01/teen-protections-age-appropriate-experiences-on-our-apps/
```

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', '--ignore-no-formats-error', '--print-json', '--no-warnings', 'https://twitter.com/GoogleDoodles/status/1779857206218756571']
[debug] Portable config "/Users/user/bin/yt-dlp.conf": ['-f', "ba+bv*[vcodec~='^((he|a)vc|h26[45])'] / (bv*+ba/b)", '--format-sort', 'br,+codec:avc:m4a,res:2160', '--merge-output-format', 'mp4', '-o', '%(channel,channel_id)s_%(id,display_id|ID)s_%(title,alt_title|TITLE)S', '--no-mtime']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (darwin_exe)
[debug] Python 3.12.1 (CPython arm64 64bit) - macOS-13.5-arm64-arm-64bit (OpenSSL 3.0.11 19 Sep 2023)
[debug] exe versions: ffmpeg 6.0-tessus (setts), ffprobe 6.0
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.43.1, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[twitter] Extracting URL: https://twitter.com/GoogleDoodles/status/1779857206218756571
[twitter] 1779857206218756571: Downloading guest token
[twitter] 1779857206218756571: Downloading GraphQL JSON
[generic] Extracting URL: https://goo.gle/3UeSqTx
[generic] 3UeSqTx: Downloading webpage
[redirect] Following redirect to https://doodles.google/doodle/celebrating-etel-adnan/
[generic] Extracting URL: https://doodles.google/doodle/celebrating-etel-adnan/
[generic] celebrating-etel-adnan: Downloading webpage
[generic] celebrating-etel-adnan: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://doodles.google/doodle/celebrating-etel-adnan/
Traceback (most recent call last):
  File "yt_dlp/YoutubeDL.py", line 1606, in wrapper
  File "yt_dlp/YoutubeDL.py", line 1741, in __extract_info
  File "yt_dlp/extractor/common.py", line 734, in extract
  File "yt_dlp/extractor/generic.py", line 2514, in _real_extract
yt_dlp.utils.UnsupportedError: Unsupported URL: https://doodles.google/doodle/celebrating-etel-adnan/
```