blackjack4494 / yt-dlc

media downloader and library for various sites.
The Unlicense
2.89k stars 364 forks source link

[Feature Request] Select language for multilingual youtube title #260

Open Coder-Iro opened 3 years ago

Coder-Iro commented 3 years ago

Checklist

Description

There are many videos in youtube that have multilingual title(Ex: https://www.youtube.com/watch?v=hJsMCfrGdK8). But there is not any feature that select language. I tryed using --add-header to add Accept-Language header and Content-Language header, but it didn't work. I think it would be good if you could make this feature.

october262 commented 3 years ago

i believe the issue is still open - https://github.com/ytdl-org/youtube-dl/issues/10758

Coder-Iro commented 3 years ago

I saw that. But there is no activity on that issue anymore.

blackjack4494 commented 3 years ago

It's definitely possible to add such feature. This would require a second download of the youtube page for that video with changed hl and gl queries. So that on this site the title will be extracted. It cannot be done with a single download since most of the logic depends on the english layout.

Coder-Iro commented 3 years ago

Maybe we can do this with youtube data api

blackjack4494 commented 3 years ago

Maybe we can do this with youtube data api

It may work. But you will need api token and as far as I know the youtube api is super restrictive (low daily limits). If you mean the official one by google. So it would likely be easier to scrap it directly in yt-dlc.

pukkandan commented 3 years ago

the youtube.py has a _call_api function. But it is never referenced anywhere so I'm not sure if it even works

Coder-Iro commented 3 years ago

Maybe we can do this with youtube data api

It may work. But you will need api token and as far as I know the youtube api is super restrictive (low daily limits). If you mean the official one by google. So it would likely be easier to scrap it directly in yt-dlc.

How about let users enter their own API tokens like rsync?

Coder-Iro commented 3 years ago

the youtube.py has a _call_api function. But it is never referenced anywhere so I'm not sure if it even works

I think that function is youtube data api v1. The currently used api is v3.

Coder-Iro commented 3 years ago

Still WIP?