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

[Ubuntu] youtube-dl does not downolad the the most recent file from playlist #15003

Closed
fatherjz opened this issue Dec 16, 2017 · 1 comment
Closed

Comments

@fatherjz
Copy link

@fatherjz fatherjz commented Dec 16, 2017

Introduction.
I want to download the the most recent file from playlist [https://www.youtube.com/playlist?list=PLRSGEZKuzW-5VWfGU8FuYTNV1rd6p7-7C]. I am using a bash script.
The bash script compares current recordings number from youtube chanel with a record numbers which have saved previous day in a file. When is new video youtube-dll should downolad file - please see the fragment of script below.

# URL = URL to playlist
# path - path to file
# temp - temporary file name where is saved previous checking
#...

LAST=$(cat $path/$temp)
NOW=$(youtube-dl -s --get-filename $URL | wc -l)
        if [ "$NOW" -gt "$LAST" ]; then
                echo $NOW>$path/$temp
                NEW_VIDEO_ID=$(youtube-dl -s --playlist-items $NOW --get-id $URL)
				cd $path && youtube-dl --extract-audio --audio-format mp3 "https://www.youtube.com/watch?v=$NEW_VIDEO_ID"

#...

Youtube-dl does not downolad the most recent file from playlist. How can I improve this?

Thanks.

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.