Open git-test02 opened 3 years ago
Welcome My brother
@git-test02 Do you have more example URLs?
Naver Cafe seems to be a collection of forums called "cafes", a la Reddit and its "subreddits". Cafes are referred to internally as "clubs". Posts are referred to as "articles".
https://cafe.naver.com/fakesoul/105792
https://cafe.naver.com/<cafe>/<id>
== OR ==
https://cafe.naver.com/fakesoul?iframe_url_utf8=/ArticleRead.nhn%3Farticleid=105792%26clubid=25227043
https://cafe.naver.com/<cafe>?iframe_url_utf8=/ArticleRead.nhn%3Farticleid=<id>%26clubid=<clubid>
== OR ==
https://cafe.naver.com/ca-fe/ArticleRead.nhn?articleid=105792&clubid=25227043
https://cafe.naver.com/ca-fe/ArticleRead.nhn?articleid=<id>&clubid=<clubid>
If we aren't able to initially parse a club ID, we need to get it from the webpage given to youtube-dl. Luckily, the club ID is littered across the HTML, but this one example should suffice for now:
r"var g_sClubId = \"(.*)\";"
https://apis.naver.com/cafe-web/cafe-articleapi/v2/cafes/25227043/articles/105792
root['result']
as simply result
result['article']['contentElements']
has element['type'] == 'MOVIE'
result
result['article']['contentElements']
where element['type'] == 'MOVIE'
https://apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/<vid>/?key=<inKey>
root["streams"]
[array]
keys
arrayroot["videos"]["list"]
[array]
root["thumbnails"]["list"]
[array]
type=s80
to get full resolution)Don't know if I'll implement the extractor myself, but I hope my research is of use to anyone that does.
@git-test02 Do you have more URLs with videos?
Checklist
Example URLs
Description
WRITE DESCRIPTION HERE [debug] Command-line args: ['-f', 'https://cafe.naver.com/fakesoul/105792'] [debug] Encodings: locale cp932, fs mbcs, out cp932, pref cp932 [debug] youtube-dl version 2021.06.06 [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19043 [debug] exe versions: ffmpeg 2021-06-09-git-e01bf559df-full_build-www.gyan.dev, ffprobe 2021-06-09-git-e01bf559df-full_build-www.gyan.dev Unsupported URL: https://cafe.naver.com/fakesoul/105792