Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bilibili] Unable to extract information from festival-type videos #7366

Closed
8 of 11 tasks
TheMasterOfMagic opened this issue Jun 21, 2023 · 3 comments
Closed
8 of 11 tasks
Labels
site-bug Issue with a specific website

Comments

@TheMasterOfMagic
Copy link

TheMasterOfMagic commented Jun 21, 2023

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

Region

Beijing, China

Provide a description that is worded well enough to be understood

Taking the video BV17R4y1a7A2 as an example. The original URL of this video was https://www.bilibili.com/video/BV17R4y1a7A2, but it has been included by the official into the festival collection called "genshin2023". This leads to the following issues:

  1. Accessing this URL in a browser will be redirected to https://www.bilibili.com/festival/genshin2023?bvid=BV17R4y1a7A2 (the new URL is still unsupported by yt-dlp because of its format).
  2. The page style of this video differs from a regular video page.

After testing, it has been found that festival-type videos exhibit the same issue (several festival-type video URLs will be provided later). It is speculated that the format of certain responses for this type of video does not comply with the expectations of yt-dlp, hence causing the inability to extract information.

Example festival-type videos:

Video ID original URL new URL
BV17R4y1a7A2 https://www.bilibili.com/video/BV17R4y1a7A2 https://www.bilibili.com/festival/genshin2023?bvid=BV17R4y1a7A2
BV1rR4y1M713 https://www.bilibili.com/video/BV1rR4y1M713 https://www.bilibili.com/festival/genshin2022?bvid=BV1rR4y1M713
BV1tG4y1B7xU https://www.bilibili.com/video/BV1tG4y1B7xU https://www.bilibili.com/festival/genshin2nd?bvid=BV1tG4y1B7xU

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

[debug] Command-line config: ['-vU', 'https://www.bilibili.com/video/BV17R4y1a7A2']
[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] (pip)
[debug] Python 3.11.4 (CPython x86_64 64bit) - macOS-13.3.1-x86_64-i386-64bit (OpenSSL 1.1.1u  30 May 2023)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.06.21, Current version: stable@2023.03.04
[debug] Downloading _update_spec from https://github.com/yt-dlp/yt-dlp/releases/latest/download/_update_spec
ERROR: You installed yt-dlp with pip or using the wheel from PyPi; Use that to update
[BiliBili] Extracting URL: https://www.bilibili.com/video/BV17R4y1a7A2
[BiliBili] 17R4y1a7A2: Downloading webpage
ERROR: [BiliBili] 17R4y1a7A2: 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
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 694, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/extractor/bilibili.py", line 290, in _real_extract
    play_info = self._search_json(r'window\.__playinfo__\s*=', webpage, 'play info', video_id)['data']
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1256, in _search_json
    json_string = self._search_regex(
                  ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1242, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
@TheMasterOfMagic TheMasterOfMagic added site-bug Issue with a specific website triage Untriaged issue labels Jun 21, 2023
@github-actions

This comment was marked as resolved.

@yt-dlp yt-dlp deleted a comment from github-actions bot Jun 21, 2023
@yt-dlp yt-dlp deleted a comment from github-actions bot Jun 21, 2023
@TheMasterOfMagic
Copy link
Author

Never mind. I just found out that as I was editing this issue, a new version was released and it has resolved the problem.

@pukkandan pukkandan closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
@pukkandan pukkandan removed the triage Untriaged issue label Jun 21, 2023
@TheMasterOfMagic
Copy link
Author

TheMasterOfMagic commented Jun 21, 2023

Related PR: #6547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests

2 participants