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

Synchronising an entire YouTube account #3659

Closed
orschiro opened this issue Sep 2, 2014 · 5 comments
Closed

Synchronising an entire YouTube account #3659

orschiro opened this issue Sep 2, 2014 · 5 comments

Comments

@orschiro
Copy link

@orschiro orschiro commented Sep 2, 2014

Hi there,

I would like to hear your opinion on the following use case for youtube-dl.

I want to keep my entire YouTube account synchronised offline in a local folder on my machine. That should include all my videos marked as favourite, later or categorised in playlists as well as uploaded videos.

I am aware of the following content: youtube-dl -citw ytuser:<username>

However, this does only download the videos uploaded of this user but not his playlists etc.

Thus, do you have any suggestions how to keep an entire YouTube account synchronised?

Thanks for your advice!

@lenaten
Copy link

@lenaten lenaten commented Sep 17, 2014

For syncronize just run youtube-dl as a schedule task every hour.

For sync your entry profile, just append every playlisy you have.

I append also the archive option, so videos will be downloaded only once.

For example:

youtube-dl -o "/tmp/music/%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 0 --download-archive ~/.cache/youtube-dl/archive -q http://www.youtube.com/playlist1 http://www.youtube.com/playlist2

@orschiro
Copy link
Author

@orschiro orschiro commented Sep 18, 2014

@lenaten

Thanks for your advice!

I created the following function:

youtube-sync() {
    youtube-dl -o "/tmp/music/%(title)s.%(ext)s" \
    --extract-audio --audio-format mp3 --audio-quality 0 \
    --download-archive ~/.cache/youtube-dl/archive -q \
    https://www.youtube.com/playlist?list=LLVnIUe_Lp4nVYG4eeBRt8Jg \
    https://www.youtube.com/playlist?list=PLj5bhjq9U0_bogsEV0qhAiAzrQHU9EIOr \
    https://www.youtube.com/playlist?list=PLj5bhjq9U0_YL_iU23kIYxZDmpjnqIUWt \
    https://www.youtube.com/playlist?list=PLj5bhjq9U0_YY5za_JKxtFGgWxXiPyGWR \
    https://www.youtube.com/playlist?list=PLj5bhjq9U0_bsFBsjD56xdIz1dB-kEmuR
}

However, it fails with the following error:

youtube-sync:1: no matches found: https://www.youtube.com/playlist?list=LLVnIUe_Lp4nVYG4eeBRt8Jg

I checked the playlist URL which is definitely correct.

Any ideas?

@phihag
Copy link
Contributor

@phihag phihag commented Sep 18, 2014

@orschiro It looks like you're using zsh, and zsh wants to match a file for everything with a question mark in it by default. Escaping the question mark or putting the URLs in quotes should be sufficient. Try

youtube-sync() {
    youtube-dl -o "/tmp/music/%(title)s.%(ext)s" \
    --extract-audio --audio-format mp3 --audio-quality 0 \
    --download-archive ~/.cache/youtube-dl/archive -q \
    'https://www.youtube.com/playlist?list=LLVnIUe_Lp4nVYG4eeBRt8Jg' \
    'https://www.youtube.com/playlist?list=PLj5bhjq9U0_bogsEV0qhAiAzrQHU9EIOr' \
    'https://www.youtube.com/playlist?list=PLj5bhjq9U0_YL_iU23kIYxZDmpjnqIUWt' \
    'https://www.youtube.com/playlist?list=PLj5bhjq9U0_YY5za_JKxtFGgWxXiPyGWR' \
    'https://www.youtube.com/playlist?list=PLj5bhjq9U0_bsFBsjD56xdIz1dB-kEmuR'
}

I am closing this issue now since your original problem seems to have been solved. Feel free to open an issue to request new features, for example a way to download all playlists a user has created. Please make sure to reread our bug reporting instructions, in particular the section about the number of different problems mentioned in a single issue.

@phihag phihag closed this Sep 18, 2014
@orschiro
Copy link
Author

@orschiro orschiro commented Sep 21, 2014

@phihag

Thanks for your help! Indeed I am using zsh and your fix works.

for example a way to download all playlists a user has created

What do you think of such a feature? A useful addition that is worth investigating? Personally I would very much be in favour of such an option to download all public playlists of a user.

If you think so too, then I will open a new bug report for it. :)

@phihag
Copy link
Contributor

@phihag phihag commented Sep 21, 2014

I don't think I'd personnally use it, but then that could be said about probably 90%+ of all the websites youtube-dl supports. So if you have interest, file a report (or even better, a pull request).

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
3 participants
You can’t perform that action at this time.