ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.52k stars 10.05k forks source link

[NSFW] [New Website request] Add support for hanime #29962

Open ghost opened 3 years ago

ghost commented 3 years ago

Example URLs

Hanime website link - https://hanime.tv/

Description

Nhentai is a website where we can read doujinshis and hanime is the website where we can watch hentai.

dirkf commented 3 years ago

In the Hanime example, the JSON being assigned to JS variable window.__NUXT__ needs to be captured (this is used by the NuxtJS framework to pass the page state from the server to the browser). Then metadata is in the .state.data.video.hentai_video object of the JSON, and streaming links are in .state.data.video.videos_manifest.

tryoutuser commented 3 years ago

why would you need yt-dl for nhentai. it doesn't even host videos. ever heard of HDoujin downloader? recommended to use that instead. if you're on phone, use Hentoid (can be found on github) to download doujinshis.

panmarco83 commented 3 years ago

This should be pretty straight forward, when given a url to a video, the url to a m3u8 "playlist" can be found in the JS variables. if I run the the meu8 url with YT, it downloads the video from the multiple parts/slices in the m3u8 and outputs it to a video file with a large file name based on the hash/donno of the m3u8 file path.

ghost commented 3 years ago

In the Hanime example, the JSON being assigned to JS variable window.__NUXT__ needs to be captured (this is used by the NuxtJS framework to pass the page state from the server to the browser). Then metadata is in the .state.data.video.hentai_video object of the JSON, and streaming links are in .state.data.video.videos_manifest.

I cannot understand anything. I am not a computer nerd and I am noob. :\

ghost commented 3 years ago

Screenshot from 2021-09-17 01-19-51

I am getting this error

ghost commented 3 years ago

The url is not supported :(

ghost commented 3 years ago

why would you need yt-dl for nhentai. it doesn't even host videos. ever heard of HDoujin downloader? recommended to use that instead. if you're on phone, use Hentoid (can be found on github) to download doujinshis.

Yup no need for nhentai. I can use hakuneko (in pc ) and aniyomi (in mobile) but I need hanime.

dirkf commented 3 years ago

Better to paste the text output inside ```code tags```, which appears like this: code tags

Unfortunately supporting your anime site in yt-dl needs someone to write Python code, as described in the Developer Instructions in the fine manual, so you either have to learn, or hope that someone else is interested.

panmarco83 commented 3 years ago

Well, I could probably do it, but I'd need specs on what to use. I've built things like this before so I know how, but I'm guessing there is a procedure you would prefer used ?

dirkf commented 3 years ago

In the fine manual, see the section Adding support for a new site. But also consider whether the site meets the criteria listed in Can you add support for this anime video site, or site which shows current movies for free?.

panmarco83 commented 3 years ago

Okay, I can't answer that, if someone can find out if it is legal, then I can have at it.

ghost commented 3 years ago

U can always download hentai from hanime for free. I read all the rules and faq :+1: There is a download button in hanime. U can download 720 p hentais butt for 1080p u need to buy premium.