yt-dlp: [XiaoHongShu] Error extracting metadata: No video formats found!

Checklist

  • I’m reporting that yt-dlp is broken on a supported site
  • I’ve verified that I have updated yt-dlp to nightly or master (update instructions)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched known issues, the FAQ, and the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read about sharing account credentials and I’m willing to share it if required

Region

US

Provide a description that is worded well enough to be understood

For example:

Fetching metadata for: https://www.xiaohongshu.com/explore/678f90fe000000001902c1fe?xsec_token=ABW18P03lUtQg9s28soPW8OGztEPHmMDGvN3vNvkHx1l8=

WARNING: Extractor failed to obtain “title”. Creating a generic title instead ERROR: [XiaoHongShu] 678f90fe000000001902c1fe: No video formats found!

I am on the latest version using yt-dlp -U.

Code:

    ydl_opts = {
        'quiet': True,
        'skip_download': True,
        'nocheckcertificate': True,
        'format': 'bestvideo*',
    }

    try:
        with yt_dlp.YoutubeDL(ydl_opts) as ydl:
            info = ydl.extract_info(url, download=False)

    except Exception as e:
        print(f"Error extracting metadata: {e}")
        return None

Provide verbose output that clearly demonstrates the problem

  • 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
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

Fetching metadata for: https://www.xiaohongshu.com/explore/678f90fe000000001902c1fe?xsec_token=ABW18P03lUtQg9s28soPW8OGztEPHmMDGvN3vNvkHx1l8=
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2025.03.23.232844 from yt-dlp/yt-dlp-nightly-builds [9d5e6de2e] (pip) API
[debug] params: {'quiet': True, 'skip_download': True, 'nocheckcertificate': True, 'format': 'bestvideo*', 'verbose': True, 'compat_opts': set(), 'http_headers': {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'en-us,en;q=0.5', 'Sec-Fetch-Mode': 'navigate'}}
[debug] Python 3.11.11 (CPython x86_64 64bit) - Linux-5.15.0-134-generic-x86_64-with-glibc2.31 (OpenSSL 1.1.1f  31 Mar 2020, glibc 2.31)
[debug] exe versions: ffmpeg N-115858-g89779a3cbe (fdk,setts), ffprobe N-115858-g89779a3cbe
[debug] Optional libraries: Cryptodome-3.22.0, brotli-1.1.0, certifi-2025.01.31, mutagen-1.47.0, requests-2.32.3, sqlite3-3.31.1, urllib3-2.3.0, websockets-15.0.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Plugin directories: none
[debug] Loaded 1843 extractors
[XiaoHongShu] Extracting URL: https://www.xiaohongshu.com/explore/678f90fe000000001902c1fe?xsec_token=ABW18P03lUtQg9s28soPW8OGztEPHmMDGvN3vNvkHx1l8=
[XiaoHongShu] 678f90fe000000001902c1fe: Downloading webpage
WARNING: Extractor failed to obtain "title". Creating a generic title instead
ERROR: [XiaoHongShu] 678f90fe000000001902c1fe: No video formats 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
Traceback (most recent call last):
  File ".../venv/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1653, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1809, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1868, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 2875, in process_video_result
    self.raise_no_formats(info_dict)
  File ".../venv/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1142, in raise_no_formats
    raise ExtractorError(msg, video_id=info['id'], ie=info['extractor'],
yt_dlp.utils.ExtractorError: [XiaoHongShu] 678f90fe000000001902c1fe: No video formats 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

Error extracting metadata: ERROR: [XiaoHongShu] 678f90fe000000001902c1fe: No video formats 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

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Thanks. Then I guess it’s just something Xiaohongshu does to the generated xsec_token, depending on the “suspicious level” of the account, user IP, or something like that.

I’ve encountered similar issues before, but they usually resolved themselves over time. Maybe there are ways to circumvent it (our current Xiaohongshu extractor is very bare-bones), but I have no idea how 😦

You probably just have to pass cookies for the time being (btw, --cookies-from-browser for Chrome is kinda broken rn due to Chrome’s restriction, if you’re on Windows. Maybe try to export one using Get cookies.txt LOCALLY and use that instead).

Thanks very much! I switched to another account and it worked by getting a new link from there. In that case, maybe I need to create multiple account. 😉