yt-dlp: [BiliBili] unable to extract play info
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- I understand that I will be blocked if I intentionally remove or skip any mandatory* field
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 and the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
China
Provide a description that is worded well enough to be understood
I was able to download videos normally at first, but this afternoon I found that the video download started to report errors. I tested a video on three different IP hosts, and this video was able to download correctly yesterday, but today it fails with an error. I tried different types of URLs and also attempted to add cookies to download the video, but none of them worked. I suspect that Bilibili may have updated its anti-scraping mechanism.And I am very sure that my yt-dlp is the latest version.
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': TruetoYoutubeDLparams instead - Copy the WHOLE output (starting with
[debug] Command-line config) and insert it below
Complete Verbose Output
yt-dlp -Uv --extract-audio --audio-format mp3 -o "%(id)s-%(title)s.%(ext)s" "https://www.bilibi
li.com/video/BV1HB4y1N7CY/" --ffmpeg-location "D:\workhome\ffmpeg\ffmpeg-master-latest-win64-gpl\bin"
[debug] Command-line config: ['-Uv', '--extract-audio', '--audio-format', 'mp3', '-o', '%(id)s-%(title)s.%(ext)s', 'https://www.bilibili.com/video/BV1HB4y1N7CY/', '--ffmpeg-location', 'D:\\workhome\\ffmpeg\\ffmpeg-master-latest-win64-gpl\\bin']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.11.18 from yt-dlp/yt-dlp [7ea278792] (pip)
[debug] Python 3.11.0 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1w 11 Sep 2023)
[debug] exe versions: ffmpeg N-117770-g322b240cea-20241114 (setts), ffprobe N-117770-g322b240cea-20241114
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.08.30, requests-2.32.3, sqlite3-3.45.3, urllib3-1.26.20, websockets-10.4
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.11.18 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.11.18 from yt-dlp/yt-dlp)
[BiliBili] Extracting URL: https://www.bilibili.com/video/BV1HB4y1N7CY/
[BiliBili] 1HB4y1N7CY: Downloading webpage
WARNING: [BiliBili] unable to extract play info; 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: [BiliBili] 1HB4y1N7CY: Failed to extract play info; 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 "D:\workhome\anaconda3\envs\crawl11\Lib\site-packages\yt_dlp\extractor\common.py", line 742, in extract
ie_result = self._real_extract(url)
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\workhome\anaconda3\envs\crawl11\Lib\site-packages\yt_dlp\extractor\bilibili.py", line 664, in _real_extract
raise ExtractorError('Failed to extract play info')
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 10
- Comments: 39 (2 by maintainers)
Commits related to this issue
- fix: bili ytdlp https://github.com/yt-dlp/yt-dlp/issues/11665 — committed to lovegaoshi/bili-music-segmenter by lovegaoshi 2 years ago
- [ie/bilibili] Fix extractor (#11667) Closes #11665 Authored by: grqz — committed to wangshaojie1995/yt-dlp by grqz 2 years ago
- [ie/bilibili] Fix extractor (#11667) Closes #11665 Authored by: grqz — committed to vladisslav2011/yt-dlp by grqz 2 years ago
- [ie/bilibili] Fix extractor (#11667) Closes #11665 Authored by: grqz — committed to subrat-lima/yt-dlp by grqz 2 years ago
the extractor should have provided a fallback… EDIT: this patch is outdated. please use pr 11667 instead
show patch
EDIT: why am I getting downvoted? Is the patch not working as expected? If so, please attach a verbose log
@2333-Del Please don’t close this issue yet. This is just a temporary patch and you shouldn’t close this issue until it’s merged into master so that the users and the maintainers can see this issue
I made a custom build for those who don’t want to run/build from source. Run
yt-dlp --update-to grqz/yt-dlp@ie/bilibili/pi_fallbkto switch to that channel and runyt-dlp --update-to nightlyto switch back afterwards if necessary.pip install --force-reinstall --break-system-packages git+https://github.com/grqz/yt-dlp.git@ie/bilibili/pi_fallbk
You could ask the maintainers. They’ve been quite busy recently so don’t expect the patch to be merged very soon. I will make a yt-dlp plugin later if there’s no progress on the pr for a long time
don’t use
--break-system-packages@hhhnaad that’s not a full verbose log. pass
-vto yt_dlp and post the full log here, starting with[debug]EDIT: I think the issue is caused by using the raw video_id instead of bvid. i’ll update the code shortly
seems like
window.__playinfo__is removed from the page source nowMy cue is this.
There was no such error yesterday. I woke up today and found an error when running. I suspect that Bilibili has updated its web page strategy.
I also encountered the same problem