yt-dlc icon indicating copy to clipboard operation
yt-dlc copied to clipboard

[Feature Request] Select language for multilingual youtube title

Open Coder-Iro opened this issue 4 years ago • 9 comments

Checklist

  • [x] I'm reporting a feature request
  • [x] I've verified that I'm running youtube-dlc version 2020.11.11-3
  • [x] I've searched the bugtracker for similar feature requests including closed ones

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.

Coder-Iro avatar Nov 27 '20 06:11 Coder-Iro

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

october262 avatar Nov 27 '20 09:11 october262

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

Coder-Iro avatar Nov 27 '20 13:11 Coder-Iro

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.

blackjack4494 avatar Nov 30 '20 02:11 blackjack4494

Maybe we can do this with youtube data api

Coder-Iro avatar Dec 01 '20 03:12 Coder-Iro

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.

blackjack4494 avatar Dec 01 '20 03:12 blackjack4494

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

pukkandan avatar Dec 01 '20 05:12 pukkandan

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 avatar Dec 01 '20 08:12 Coder-Iro

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 avatar Dec 01 '20 10:12 Coder-Iro

Still WIP?

Coder-Iro avatar Apr 03 '21 07:04 Coder-Iro