Repository: yt-dlp
Issue: [TikTok] Support for stories
Labels: site-enhancement

### 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 requesting a site-specific feature
- [X] I've verified that I'm running yt-dlp version **2023.03.04** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [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

_No response_

### Example URLs

https://www.tiktok.com/t/ZTRoA5qKs/

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

Currently story links return a 404. If the URL is requested with one of their mobile app user-agents then it returns the normal video page. The user-agent that is used in the normal api call will work on the tiktok stories.

```bash
curl -fsSL \
  -H "User-Agent: com.ss.android.ugc.trill/260103 (Linux; U; Android 10; en_US; Pixel 4; Build/QQ3A.200805.001; Cronet/58.0.2991.0)" \
  https://www.tiktok.com/t/ZTRoA5qKs/
  # or
  https://www.tiktok.com/@dotfail00/video/7239482392900160810
```

The metadata is in the `SIGI_STATE` script tag like normal posts


- Pastes of the outputs since stories dont last long: [curl HTML](https://0x0.st/HbME.html.txt/tiktok-story-curl-output.html.txt) / [`SIGI_STATE` JSON](https://0x0.st/HbMl.json/tiktok-story-SIGI_STATE.json)


### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] 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: ['--external-downloader', 'aria2c', '--external-downloader-args', '-j 10 -x 10 -s 10', '-vU', 'https://www.tiktok.com/t/ZTRoA5qKs/?t=2']
[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@2023.03.04 [392389b7d] (linux_exe)
[debug] Python 3.10.9 (CPython x86_64 64bit) - Linux-5.11.0-49-generic-x86_64-with-glibc2.33 (OpenSSL 3.0.8 7 Feb 2023, glibc 2.33)
[debug] exe versions: ffmpeg 4.3.2-0, ffprobe 4.3.2-0, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
WARNING: External Downloader arguments given without specifying name. The arguments will be given to aria2c
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.03.04, Current version: stable@2023.03.04
Current Build Hash: 7494af600c4389d19961b44e406472bba7c54c28dc1f62bb72bdde7181708a9a
yt-dlp is up to date (stable@2023.03.04)
[vm.tiktok] Extracting URL: https://www.tiktok.com/t/ZTRoA5qKs/?t=2
[vm.tiktok] ZTRoA5qKs: Downloading webpage
[TikTok] Extracting URL: https://www.tiktok.com/@dotfail00/video/7239482392900160810?_d=secCgYIASAHKAESPgo8KYYdUAH%2FEtnec3fP4MzMPNMqsCrZUI5%2BnIAIcrgi%2FevMb0SeoiOqQzjZR%2FKBE7VDWTIyniv1sLp%2BjpFnGgA%3D&_r=1&aweme_type=40&checksum=05b6bc27ef04df2d223768350a6143afc66d2648c18dcf42226fd5e0ecb9e7c1&preview_pb=0&sec_user_id=MS4wLjABAAAAllc8v69iXrOQdj5Sut1FTnJZ9DI-S5yAToZVQ7yUQdIf_MtS_LqSGOvcGY_3eW7f&share_app_id=1233&share_item_id=7239482392900160810&share_link_id=92c3b7a6-4c9c-4272-a017-bf629d75319a&sharer_language=en&social_share_type=0&source=h5_m&story_type=1&story_uid=7174985049450808366&timestamp=1685573403&u_code=e597kjm63h454f&ug_btm=b8727%2Cb2878&ugbiz_name=Main&user_id=7174985049450808366&utm_campaign=client_share&utm_medium=android&utm_source=copy
[TikTok] 7239482392900160810: Downloading video feed
WARNING: [TikTok] 7239482392900160810: Unable to find video in feed; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U; trying with webpage
[TikTok] 7239482392900160810: Downloading webpage
ERROR: [TikTok] 7239482392900160810: Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp/extractor/common.py", line 694, in extract
  File "yt_dlp/extractor/tiktok.py", line 566, in _real_extract
  File "yt_dlp/extractor/common.py", line 1097, in _download_webpage
  File "yt_dlp/extractor/common.py", line 1048, in download_content
  File "yt_dlp/extractor/common.py", line 882, in _download_webpage_handle
  File "yt_dlp/extractor/common.py", line 839, in _request_webpage

  File "yt_dlp/extractor/common.py", line 821, in _request_webpage
  File "yt_dlp/YoutubeDL.py", line 3742, in urlopen
  File "urllib/request.py", line 525, in open
  File "urllib/request.py", line 634, in http_response
  File "urllib/request.py", line 563, in error
  File "urllib/request.py", line 496, in _call_chain
  File "urllib/request.py", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
```