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

Isn't the playlist's title "Binomische Formeln"? #23800

Closed
Albretch opened this issue Jan 21, 2020 · 5 comments
Closed

Isn't the playlist's title "Binomische Formeln"? #23800

Albretch opened this issue Jan 21, 2020 · 5 comments
Labels

Comments

@Albretch
Copy link

@Albretch Albretch commented Jan 21, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

however when you try

--output "./%(uploader)s/%(playlist_title)s/%(playlist_index)s_%(title)s_%(id)s.%(ext)s"

with

https://www.youtube.com/playlist?list=PLyRHCLiLznwT3gSGryiQrZtuDUnivhAAT

or any other playlist from those "mathehilfe24" people:

https://www.youtube.com/user/mathehilfe24/playlists

and many other ones I have noticed, you get as playlist title: "NA" and the .info.json files of the videos show as attribute "null" for playlist and playlist_index

...
"playlist": null,
"title": "1. binomische Formel - \u00dcbung Anwendung - als Potenz schreiben",
"creator": null,
"is_live": null,
"playlist_index": null
...

I need to have all videos belonging to a certain playlist in a separate directory and I want them prefixed with their running index. How do you do that using youtube-dl?

lbrtchx

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jan 21, 2020

youtube-dl --get-filename -o '%(uploader)s/%(playlist_title)s/%(playlist_index)s_%(title)s_%(id)s.%(ext)s' https://www.youtube.com/playlist?list=PLyRHCLiLznwT3gSGryiQrZtuDUnivhAAT
Mathehilfe24 - Mathe einfach gut erklärt/Binomische Formeln/01_3. binomische Formel - Anwendung - Binomische Formeln_6UlZpFPpWi4.mp4
Mathehilfe24 - Mathe einfach gut erklärt/Binomische Formeln/02_1. binomische Formel - Übung Anwendung - als Potenz schreiben_O7vb03flUTc.mp4
@Albretch
Copy link
Author

@Albretch Albretch commented Jan 23, 2020

OK, I was able to reproduce the error.

When you use as input parameter the playlist's id youtube-dl works as expected, but not when you go: --batch-file "<file with exactly the same yt ids/uris>"

$ _UA="Mozilla/5.0 (X11; Linux i686) KHTML/4.8.4 (like Gecko) Konqueror/4.8"
$ _Ls="de,en,es"

$ _BRNX="/home/$(whoami)"
$ _ODIR="${_BRNX}/LklWb/com/youtube"
$ echo "// __ $_ODIR="${_ODIR}""

$ _YT_PL="PL3DFDD61A6487A585"

$ python ./youtube-dl --user-agent "${_UA}" --no-progress --no-call-home --continue --ignore-errors --no-overwrites --format "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --write-auto-sub --write-sub --sub-lang "${Ls}" --write-info-json --yes-playlist --playlist-start 1 --output "${ODIR}/%(uploader)s/%(playlist_title)s/%(playlist_index)s%(title)s%(id)s.%(ext)s" "${_YT_PL}"
[youtube:playlist] PL3DFDD61A6487A585: Downloading webpage
[download] Downloading playlist: test playlist
[youtube:playlist] playlist test playlist: Downloading 2 videos
[download] Downloading video 1 of 2
[youtube] Ei9JQ6br-y0: Downloading webpage
[youtube] Ei9JQ6br-y0: Downloading video info webpage
WARNING: Unable to extract video title
WARNING: unable to extract description; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
ERROR: This video is no longer available because the YouTube account associated with this video has been terminated.
Sorry about that.
[download] Downloading video 2 of 2
[youtube] bie_Pj0AbAY: Downloading webpage
[youtube] bie_Pj0AbAY: Downloading video info webpage
WARNING: video doesn't have subtitles
[youtube] bie_Pj0AbAY: Looking for automatic captions
WARNING: Couldn't find automatic captions for bie_Pj0AbAY
[info] Writing video description metadata as JSON to: /home/pfniggah/LklWb/com/youtube/fruitybat/test playlist/2_Green Screen and After Effects_bie_Pj0AbAY.info.json
[download] Destination: /home/pfniggah/LklWb/com/youtube/fruitybat/test playlist/2_Green Screen and After Effects_bie_Pj0AbAY.f135.mp4
[download] Download completed
[download] Destination: /home/pfniggah/LklWb/com/youtube/fruitybat/test playlist/2_Green Screen and After Effects_bie_Pj0AbAY.f140.m4a
[download] Download completed
[ffmpeg] Merging formats into "/home/pfniggah/LklWb/com/youtube/fruitybat/test playlist/2_Green Screen and After Effects_bie_Pj0AbAY.mp4"
Deleting original file /home/pfniggah/LklWb/com/youtube/fruitybat/test playlist/2_Green Screen and After Effects_bie_Pj0AbAY.f135.mp4 (pass -k to keep)
Deleting original file /home/pfniggah/LklWb/com/youtube/fruitybat/test playlist/2_Green Screen and After Effects_bie_Pj0AbAY.f140.m4a (pass -k to keep)
[download] Finished downloading playlist: test playlist


$ _UA="Mozilla/5.0 (X11; Linux i686) KHTML/4.8.4 (like Gecko) Konqueror/4.8"
$ _Ls="de,en,es"
$
$ _BRNX="/home/$(whoami)"
$ _ODIR="${_BRNX}/LklWb/com/youtube"
$ echo "// __ $_ODIR="${_ODIR}""
// __ $_ODIR="/home/pfniggah/LklWb/com/youtube"
$
$ _IFL_YT_URIS="/home/pfniggah/test_yt_PL.ls"
$ ls -l "${_IFL_YT_URIS}"
-rw-r--r-- 1 pfniggah pfniggah 24 Jan 23 17:59 /home/pfniggah/test_yt_PL.ls
$ wc -l "${_IFL_YT_URIS}"
2 /home/pfniggah/test_yt_PL.ls
$ cat "${_IFL_YT_URIS}"
Ei9JQ6br-y0
bie_Pj0AbAY
$
$ python ./youtube-dl --user-agent "${_UA}" --no-progress --no-call-home --continue --ignore-errors --no-overwrites --format "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --write-auto-sub --write-sub --sub-lang "${Ls}" --write-info-json --yes-playlist --playlist-start 1 --output "${ODIR}/%(uploader)s/%(playlist_title)s/%(playlist_index)s%(title)s%(id)s.%(ext)s" --batch-file "${_IFL_YT_URIS}"
[youtube] Ei9JQ6br-y0: Downloading webpage
[youtube] Ei9JQ6br-y0: Downloading video info webpage
WARNING: Unable to extract video title
WARNING: unable to extract description; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
ERROR: This video is no longer available because the YouTube account associated with this video has been terminated.
Sorry about that.
[youtube] bie_Pj0AbAY: Downloading webpage
[youtube] bie_Pj0AbAY: Downloading video info webpage
WARNING: video doesn't have subtitles
[youtube] bie_Pj0AbAY: Looking for automatic captions
WARNING: Couldn't find automatic captions for bie_Pj0AbAY
[info] Writing video description metadata as JSON to: /home/pfniggah/LklWb/com/youtube/fruitybat/NA/NA_Green Screen and After Effects_bie_Pj0AbAY.info.json
[download] Destination: /home/pfniggah/LklWb/com/youtube/fruitybat/NA/NA_Green Screen and After Effects_bie_Pj0AbAY.f135.mp4
[download] Download completed
[download] Destination: /home/pfniggah/LklWb/com/youtube/fruitybat/NA/NA_Green Screen and After Effects_bie_Pj0AbAY.f140.m4a
[download] Download completed
[ffmpeg] Merging formats into "/home/pfniggah/LklWb/com/youtube/fruitybat/NA/NA_Green Screen and After Effects_bie_Pj0AbAY.mp4"
Deleting original file /home/pfniggah/LklWb/com/youtube/fruitybat/NA/NA_Green Screen and After Effects_bie_Pj0AbAY.f135.mp4 (pass -k to keep)
Deleting original file /home/pfniggah/LklWb/com/youtube/fruitybat/NA/NA_Green Screen and After Effects_bie_Pj0AbAY.f140.m4a (pass -k to keep)
$


and this is what I got:

$ date; python ./youtube-dl --update
Thu Jan 23 18:07:28 CET 2020
Updating to version 2020.01.15 ...
ERROR: unable to download latest version

$ date; python ./youtube-dl --version
Thu Jan 23 18:07:43 CET 2020
2019.09.28

$ uname -a
Linux deb9 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux
$

I haven't foudn the time to upgrade to the newest version using the sources

lbrtchx

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jan 23, 2020

When you use as input parameter the playlist's id youtube-dl works as expected, but not when you go: --batch-file "<file with exactly the same yt ids/uris>"

because batch files are not treated as playlists, playlist_index and playlist_title will be present only when a playlist is being downloaded.
if you want something similar to playlist_index for batch files you can use autonumber,

@Albretch
Copy link
Author

@Albretch Albretch commented Jan 25, 2020

When you use as input parameter the playlist's id youtube-dl works as expected, but not when you go: --batch-file "<file with exactly the same yt ids/uris>"

because batch files are not treated as playlists, playlist_index and playlist_title will be present only when a playlist is being downloaded.
if you want something similar to playlist_index for batch files you can use autonumber,

Not even when every line of the batch file obviously is a playlist based on the encoding that youtube itself uses? (playlists are prefixed as "PL.*" )

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jan 25, 2020

it doesn't matter if you pass URLs in the command line or in a batch file, youtube-dl will process them the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.