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
131.38k stars 9.96k forks source link

How to download the last video of a playlist (Crunchyroll) #18341

Closed percheperche closed 5 years ago

percheperche commented 5 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.11.23. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2018.11.23
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

I would want an option to download the last video available in a playlist. Example: youtube-dl --playlist-last https://www.crunchyroll.com/kinos-journey-the-beautiful-world-the-animated-series will download the last video of the playlist.

dstftw commented 5 years ago

--playlist-items 1 --playlist-reverse.

percheperche commented 5 years ago

It doesn't work:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-f', 'best[height=480]', '--hls-prefer-native', '--cookies', 'cookies.txt', '--playlist-items', '1', '--playlist-reverse', 'https://www.crunchyroll.com/tsurune']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.11.18
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-92292-ge95987f6ca, ffprobe N-92292-ge95987f6ca, rtmpdump 2.5
[debug] Proxy map: {}
[crunchyroll:playlist] tsurune: Downloading webpage
[download] Downloading playlist: Tsurune
[crunchyroll:playlist] playlist Tsurune: Collected 6 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[crunchyroll] 778234: Downloading webpage
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-esES m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-ptBR m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-esLA m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-ruRU m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-frFR m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-deDE m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-itIT m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-enUS m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP m3u8 information
[crunchyroll] 778234: Downloading audio-jaJP-hardsub-arME m3u8 information
[crunchyroll] 778234: Downloading media info
[debug] Invoking downloader on 'https://v.vrv.co/evs/9dcba8ab134f0dbd3227871d72c1ed33/assets/ba9bfdb46cc817ab661166596dee8f56_3565334.mp4/index-v1-a1.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly92LnZydi5jby9ldnMvOWRjYmE4YWIxMzRmMGRiZDMyMjc4NzFkNzJjMWVkMzMvYXNzZXRzLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDM2ODIzMjN9fX1dfQ__&Signature=aXm6e92Ewj8BWKIWPdDgk0q7KnIelLlB8-dgCIyx-isX~y0bVi8oFyrvnPzpRYsF5OZ4ugNqfETeDVskDWINY203CY2YPaQWeTOHtIMwpJMPMO3NgvWkXdIGxbl~H8E1HwtYfh~HdoYA6wJSNgLS7KzvR6-tdp8ikU2sh5X-iOXad2Gr9LurJABNR6R2VCIbgJYLEhmk4Qql5pKlgP0aZs2gCSZKeneFn4ZstJ6W7m1P-oSh4ymtfMdd6eg9e6Y0iuiY4ojpQmH2Xs31hJXFGbt6UdOzDXJYCDylsqPS6xmFdARUwunqxO5C38NYoLc0jCkh7ekSuv4AqAsnwHyZ3g__&Key-Pair-Id=APKAJKQQ2INNHTYFB44A'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 145
[download] Destination: Tsurune Episode 1 – The Young Man on the Shooting Range-778234.mp4
[download]  31.3% of ~222.72MiB at 492.62KiB/s ETA 01:0

As you can see, this downloads the first video, not the last available. Please re-open.

dstftw commented 5 years ago

Bother to open this page and see which video is first and which is last.

percheperche commented 5 years ago

Sorry? I can't really understand what you mean. I want to make a batch that will download the last video available in a Crunchyroll playlist. --playlist-items 1 -- playlist-reverse doesn't work because it downloads the first video, not the last. Let's say this is the page youtube-dl --playlist-items 1 --playlist-reverse https://www.crunchyroll.com/tsurune as of 11/29/2018 should download this but it actually downloads the first one

dstftw commented 5 years ago

Again: serie 1 is the last video in playlist because CR lists series in playlist in reverse order. Thus to download the last serie you must download the first video from in the playlist.