Open szdytom opened 1 year ago
The _VALID_URL
can be updated to match URLs like https://www.bilibili.com/festival/lty10th?bvid=BV1dZ4y1Y7bt. Is this the only such format (ie .../festival/slug?bvid=...
) or should other top-level path components and/or more path components be matched?
The error occurs because the title extraction fails. In the problem page there is this <title>洛天依十周年官方演唱会</title>
. If that should be the fallback title, that's fine, but I'm not familiar with the content. Then
$ python3.9 -m youtube_dl -v -F 'https://www.bilibili.com/festival/lty10th?bvid=BV1dZ4y1Y7bt'
[debug] System config: ['--prefer-ffmpeg']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-F', 'https://www.bilibili.com/festival/lty10th?bvid=BV1dZ4y1Y7bt']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: a5464aca1
[debug] Python version 3.9.16 (CPython) - Linux-4.4.0-210-generic-i686-with-glibc2.23
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[BiliBili] 1dZ4y1Y7bt: Downloading webpage
[BiliBili] 1dZ4y1Y7bt: Downloading video info page
WARNING: unable to extract description; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract og:image; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[info] Available formats for 1dZ4y1Y7bt:
format code extension resolution note
0 flv unknown 3.53GiB
$
.../festival/<slug>?bvid=<bvid>)
is used on rare occasions.What should be the title of the test video https://www.bilibili.com/festival/lty10th?bvid=BV1dZ4y1Y7bt?
If there isn't an obvious candidate, the title could be f'{festival_title}: {video_id}'
or similar.
The element can be located with .video-toobar_title
whoes innerText is 【洛天依原创曲】光与影的对白【2022官方生贺曲】
. This is very different from other video pages.
That's fine. There are other fields not being extracted but I don't think they should cause warnings. Obviously, suggestions for alternative sources in the page are welcome.
$ python3.9 -m youtube_dl --get-title 'https://www.bilibili.com/festival/lty10th?bvid=BV1dZ4y1Y7bt'
WARNING: unable to extract description; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract og:image; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
【洛天依原创曲】光与影的对白【2022官方生贺曲】
$
Are the 【】
part of the title or should they be stripped?
no it shouldn't, the 【】
is a part of the title.
P.S. video description can be read by document.querySelector('.video-desc').innerHTML
Checklist
Verbose log
Description
cannot correctly resolve
bilibili.com
video URLs which is contained in a festival. for example,while a normal video(not contained in a festival) URL should look like
but using
https://www.bilibili.com/video/BV1dZ4y1Y7bt
still does not work for it auto redirects back to the festival URL.bilibili.com 的包含在 festival 中的视频链接不能被正确解析。