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

vlive have change url format #60

Closed
6 tasks done
quekky opened this issue Oct 30, 2020 · 8 comments
Closed
6 tasks done

vlive have change url format #60

quekky opened this issue Oct 30, 2020 · 8 comments

Comments

@quekky
Copy link

quekky commented Oct 30, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dlc version 2020.10.26
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

$ youtube-dlc https://www.vlive.tv/post/0-19646784 -s -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.vlive.tv/post/0-19646784', '-s', '-v']
[debug] Loading archive file None
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dlc version 2020.10.26
[debug] Python version 3.8.6 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg N-99793-gae9a1a9698, ffprobe N-99793-gae9a1a9698
[debug] Proxy map: {}
[generic] 0-19646784: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 0-19646784: Downloading webpage
[generic] 0-19646784: Extracting information
ERROR: Unsupported URL: https://www.vlive.tv/post/0-19646784
Traceback (most recent call last):
  File "youtube_dlc\YoutubeDL.py", line 830, in extract_info
  File "youtube_dlc\extractor\common.py", line 532, in extract
  File "youtube_dlc\extractor\generic.py", line 3382, in _real_extract
youtube_dlc.utils.UnsupportedError: Unsupported URL: https://www.vlive.tv/post/0-19646784

Description

Vlive now change their URL format (the old format is http://www.vlive.tv/video/0000000 or https://channels.vlive.tv/xxxx/video)
New format:

Single video: https://www.vlive.tv/post/1-19369327
Channel: https://www.vlive.tv/channel/FE619/board/3498

@SeonjaeHyeon
Copy link
Contributor

The old URL format is still working.

Old: https://www.vlive.tv/video/219057
New: https://www.vlive.tv/post/1-19369327

Maybe it should support both formats for now.

@etec-masterofsynapse
Copy link

etec-masterofsynapse commented Oct 30, 2020

The old URL format is still working.

Old: https://www.vlive.tv/video/219057
New: https://www.vlive.tv/post/1-19369327

Maybe it should support both formats for now.

Yes, the old format still works, but since the main gain to archive channels on vlive is to use the https://channels.vlive.tv/{id} URL and that URL now supplies the new format that youtube-dlc doesnt understand yet. So minimum for the channel archiving the new URL structure has to be implemented.

@insaneracist
Copy link
Contributor

Does downloading still work for you with the old-style urls?

@etec-masterofsynapse
Copy link

Does downloading still work for you with the old-style urls?

No, it doesnt. When I call youtube-dlc.exe with the old-style URL, it still gives the Unable to extract video params error.
So it seems that Vlive also modified the information the website supplies to watch the video.

@SeonjaeHyeon
Copy link
Contributor

So it seems that Vlive also modified the information the website supplies to watch the video.

Right. They completely revised the site, so the way to get some video parameters (like inkey) is changed.
We should modify those codes.

@robindz
Copy link

robindz commented Oct 31, 2020

The videoId can still be found in the json metadata that is loaded when requesting the site, it's now called vodId. The same goes for videoSeq, this is also present in the json metadata.

They then get the key through this endpoint: https://www.vlive.tv/globalv-web/vam-web/video/v1.0/vod/<VIDEOSEQ>/inkey, when requesting the key, there must be a Referer header along with the request, I suggest using https://www.vlive.tv/. This will return some json with the key present.

You can then use the same old endpoint to get all the other metadata: https://apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/<VIDEOID>?key=<KEY>&videoId=<VIDEOID>

An example for https://www.vlive.tv/post/1-19577011

Download the webpage.
Extract videoSeq & vodId: 219989 & 1B4719DCEC0D305AD8F6021DC9E8493B2099
Request the key @ https://www.vlive.tv/globalv-web/vam-web/video/v1.0/vod/219989/inkey (make sure to use Referer: "https://www.vlive/tv/" otherwise you'll get a Bad Request response).
The response looks like this:

{
    "inkey": "V1277a3e3cd2414e53a79bb9ead3d6b3a7a4a64e426894cfc0616548e63f2353bc66fbb9ead3d6b3a7a4a",
    "adParams": {
        "adChannelId": 6,
        "adCpId": 3,
        "videoAdEnabled": true
    }
}

Use the previously achieved vodId & just received inkey to make a request to the metadata endpoint: https://apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/1B4719DCEC0D305AD8F6021DC9E8493B2099?key=V1277a3e3cd2414e53a79bb9ead3d6b3a7a4a64e426894cfc0616548e63f2353bc66fbb9ead3d6b3a7a4a&videoId=1B4719DCEC0D305AD8F6021DC9E8493B2099

^ This will expire after some time so if you read this late you just have to repeat the steps above to get the metadata and see for yourself.

@quekky
Copy link
Author

quekky commented Nov 10, 2020

The patch from exwm seems to work. But the titles are korean instead of english

@robindz
Copy link

robindz commented Nov 11, 2020

@quekky Pretty sure a lot of endpoints use the locale parameter, which if set to en will reply with English titles if they are available.

siikamiika pushed a commit to siikamiika/yt-dlc that referenced this issue Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants