-
Notifications
You must be signed in to change notification settings - Fork 368
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
[vlive] fix extractor for revamped website #101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the LIVE video ended, video_status
is changed to ENDED
. So I think it would be better add this.
It may be better also to use the endpoints |
{
"code": 9115,
"message": "유효하지 않은 VideoSeq. <videoSeq>"
} |
For LIVE videos, |
@SeonjaeHyeon |
As far as I can tell, playlists still exist, https://www.vlive.tv/video/26669 is a video that is part of a playlist. |
@robindz curious how you found the If playlists are only present on video and post urls now, then it won't be possible to use the playlist extractor based only on the url. A cli flag or something may be necessary then to download the whole playlist given a video link. |
@exwm I just looked at devtools during a live video. Searched for 'm3u8' and eventually found that endpoint. |
I tested your changes across 15 vlive channels with my wrapper-script. Had no errors during the runs apart from Vlive+ videos. |
* use live video info endpoint from v3 api
@etec-masterofsynapse I've pushed a fix for the vlive+ video detection. I haven't looked at extracting and downloading vlive+ videos, though I'm not sure if that was possible before. I don't have a vlive+ account in any case and am not interested in bypassing the paywall. |
There are some inconsistencies regarding CH+ and Vlive+ so there may have been an update that allowed both. I tried to do that with the URL I have access to, only to get an Unable to download JSON metadata error because of a HTTP 500 error. |
Fair enough. I'm not too clear on the details of vlive+ or the difference between it and CH+. @etec-masterofsynapse Do you have any examples of CH+ videos that don't work without login on the revamped site? I don't have a vlive+ account or any CH+ access so would be hard to test. |
Here is one that definitely needs a login: https://www.vlive.tv/post/0-18401413 // https://www.vlive.tv/video/202607 |
@etec-masterofsynapse I'm able to log in through youtube-dlc, so I think that part of the code is fine. When I try to download https://www.vlive.tv/video/202607 as you linked, I get an error object with a message that says Any chance you could check what the |
If you could help me how I would go about checking the dict you mentioned? |
@etec-masterofsynapse One easy way would be to just add a Be careful not to post the whole contents of the dict, it may contain sensitive information. |
I tested some Vlive+ VODs and all of them contain |
@SeonjaeHyeon Can you check the network requests made on the website? Does it still make a request to the normal vod key endpoint |
I'm thinking this pull request should be ready for review and merge. Fixing downloading of premium content can be done in a new pull request. Should I squash the commits into one? |
I found out what was missing. Vlive+ VODs require And.. actually, even though we download Vlive+ VODs, we cannot play them due to Widevine DRM. I think decrypting DRM is not this plugin's purpose. Besides, download for replays uses Naver TV's endpoint, it seems that the endpoint doesn't work for DRM contents. Maybe it would be better that the plugin just raises ExtractorError when HTTP 500 error occurred. |
It definitely feels like a greyer area. I don't think HTTP 500 errors are the right thing to check though. They may occur for other reasons. I don't think I will be working any further on the handling of premium content. I think a separate pull request should be made if someone wants to pursue that. |
downloading or circumventing/breaking DRM is not allowed! |
Downloading premium content was already previously present in the vlive extractor. Specifically, I think CH+ content from V LIVE could be downloaded, though I don't know if that content was DRM-protected. That functionality is now broken, though it may be as trivial as adding a I don't think circumventing video DRM such as Widevine DRM is even in the scope of the capabilities of youtube-dl/youtube-dlc. |
From what I read CH+ had a different or no DRM at all, which disappeared by downloading the file. Vlive+ however is equipped with the newer Widevine DRM. Depending on Level 2 or 3 it could be automatically removed (Level 3 is vulnerable) but since it isnt wanted we wont do it. :) |
I think downloading the content is fine as long as there isn't explicit DRM circumvention. Generally, I maintain that it is not the tool but the hand that wields it. Still, I think that work would be better done in a separate pull request by someone else with access to premium content for testing, if it is to be done at all. The discussion here may help guide that potential effort. |
Try to tell that in court haha. I do think the same since this tool (yt-dlc) isn't purely or solely focused on circumventing at all. |
Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
Fixes vlive extractor for their revamped website. This should address #60 to some degree but is tested only with VODs and not with other video types such as live video. Thanks to @robindz in #60 (comment) for investigation into the fix.
The basic extractor now supports both video urls (eg
https://www.vlive.tv/video/1326
) and video post urls that point to the same video (eghttps://vlive.tv/post/1-18244258
which points to the same example video1326
).Adds support for new channel url format. The old format followed the example
https://channels.vlive.tv/FCD4B
while the new format follows the examplehttps://www.vlive.tv/channel/FCD4B
. The old format redirects to the new format. Additionallyhttps://www.vlive.tv/channel**s**/FCD4B
will also redirect tohttps://www.vlive.tv/channel/FCD4B
. Also includes some regex improvements here, allowingwww
andm
subdomains in channel urls.Playlists seem to have been removed from my cursory investigation and I did not touch the playlist extractor code for now.
Edit 1: The live video extractor should now be fixed using the
https://www.vlive.tv/globalv-web/vam-web/old/v3/live/<videoSeq>/playInfo
endpoint. Thanks to @robindz and @SeonjaeHyeon for finding this endpoint.Edit 2: Things missing so far:
Edit 3: Fixed detection of vlive+ paywalled videos. Login for vlive+ videos is likely missing.
Edit 4: Login is working, but downloading premium content is still broken. There may be a different endpoint or different headers that need to be passed to the current vod key endpoint
https://www.vlive.tv/globalv-web/vam-web/video/v1.0/vod/%s/inkey
. Playlists are also still not working. Work on these items could be continued in a new pull request.