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

Add Youtube subscription feed download #498

Closed
HaydenRU opened this issue Oct 26, 2012 · 11 comments
Closed

Add Youtube subscription feed download #498

HaydenRU opened this issue Oct 26, 2012 · 11 comments
Labels

Comments

@HaydenRU
Copy link

@HaydenRU HaydenRU commented Oct 26, 2012

https://github.com/HaydenRU/Random-Python-Scripts/blob/master/ytsubdl.py
I'm sorry that i can't commit properly, your code is way too advanced to understand for me.

I wrote this little script to download last 20 videos from one's Youtube subscription feed.
It parses RSS to grab video links and then downloads them one by one (should have probably used youtube-dl -a, but oh well).

It is very handy to run this as cron job and download last videos on schedule.

I very much admire your work, thanks for a great tool!

@jaimeMF jaimeMF closed this in 04cc961 Jul 7, 2013
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 7, 2013

I've added it, but it will need to know your login info (the --netrc option).
For downloading the last 20 videos you can run:

youtube-dl :ytsubscriptions --netrc --playlist-end 20
@HaydenRU
Copy link
Author

@HaydenRU HaydenRU commented Jul 7, 2013

Good stuff!

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 7, 2013

The ytsubscriptions keyword has been changed to :ytsubscriptions or :ytsubs

@Yamakaky
Copy link

@Yamakaky Yamakaky commented Aug 24, 2013

Hi.

I tried using your feature, but it seems I do something wrong. I'm using this command line [#]_ to download the videos posted today on the channels I follow (with -s to test, and login name and password replaced). The problem is that it seems to want to download all the videos on my subscription feed, and not only the ones I selected. Joined the log_ of the session. youtube-dl version : 2013.08.23.

Thanks for your attention.

PS : this feature is not really documented in the man page and README.

.. [#] youtube-dl -s -u <username> -p <password> :ytsubs --dateafter now-1day
.. _log: http://pastebin.com/ZtxKKT09

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Aug 24, 2013

@Yamakaky please open a new issue for improving the documentation (contributions welcomed).
For the other thing (other time don't be afraid of opening a new issue), it's downloading the video webpage because the date is not known in advance, but the videos that doesn't match the date shouldn't be downloaded, if they are downloaded open a new issue and we'll try to fix it.

@Yamakaky
Copy link

@Yamakaky Yamakaky commented Aug 24, 2013

It's written 'Downloading video #1 to 381' so it seems not to work ^^

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Aug 24, 2013

It seems to work fine:

$ y-dl http://www.youtube.com/user/TommyEdisonXP --dateafter now-1month --test
[debug] System config: []
[debug] User config: ['--keep-video', '--verbose', '--write-info-json', '--write-thumbnail']
[debug] Command-line args: ['http://www.youtube.com/user/TommyEdisonXP', '--dateafter', 'now-1month', '--test']
[debug] youtube-dl version 2013.08.23
[debug] Git HEAD: f2aeefe
[debug] Python version 2.7.5 - Darwin-11.4.2-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube:user] TommyEdisonXP: Downloading video ids from 1 to 51
[youtube:user] TommyEdisonXP: Downloading video ids from 51 to 101
[download] Downloading playlist: TommyEdisonXP
[youtube:user] playlist 'TommyEdisonXP': Collected 86 video ids (downloading 86 of them)
[download] Downloading video #1 of 86
[youtube] Setting language
[youtube] xWenoaoYJ6w: Downloading video webpage
[youtube] xWenoaoYJ6w: Downloading video info webpage
[youtube] xWenoaoYJ6w: Extracting video information
[info] Video description metadata as JSON to: How A Blind Person Experiences VidCon 2013-xWenoaoYJ6w.mp4.info.json
[youtube] xWenoaoYJ6w: Downloading thumbnail ...
[youtube] xWenoaoYJ6w: Writing thumbnail to: How A Blind Person Experiences VidCon 2013-xWenoaoYJ6w.jpg
[download] Destination: How A Blind Person Experiences VidCon 2013-xWenoaoYJ6w.mp4
[download] 100.0% of 10.00KiB at  7.39MiB/s ETA 00:00
[download] Downloading video #2 of 86
[youtube] Setting language
[youtube] NeB0BH8rAc8: Downloading video webpage
[youtube] NeB0BH8rAc8: Downloading video info webpage
[youtube] NeB0BH8rAc8: Extracting video information
[info] Video description metadata as JSON to: App That Identifies Objects For Blind People-NeB0BH8rAc8.mp4.info.json
[youtube] NeB0BH8rAc8: Downloading thumbnail ...
[youtube] NeB0BH8rAc8: Writing thumbnail to: App That Identifies Objects For Blind People-NeB0BH8rAc8.jpg
[download] Destination: App That Identifies Objects For Blind People-NeB0BH8rAc8.mp4
[download] 100.0% of 10.00KiB at 928.42KiB/s ETA 00:00
[download] Downloading video #3 of 86
[youtube] Setting language
[youtube] UzffnbBex6c: Downloading video webpage
[youtube] UzffnbBex6c: Downloading video info webpage
[youtube] UzffnbBex6c: Extracting video information
[download] [download] 2013-07-16 upload date is not in range 2013-07-25 - 9999-12-31
...

The message Downloading video #3 of 86 could probably be improved, open an issue with the request and (if possible) some sugesttion.

@Yamakaky
Copy link

@Yamakaky Yamakaky commented Aug 24, 2013

I understand what it is doing. It check if the video needs to be downloaded before each download, not all at the beginning. It's not very efficient, especially to get a few in a lot, or to continue stopped download of a long playlist. I gonna open an issue for that.

Thanks for your answer.

@FernandoMiguel
Copy link

@FernandoMiguel FernandoMiguel commented Mar 10, 2014

sorry for picking up this ticket, but it was what google provided me with.

$ youtube-dl --version
2014.03.10

youtube-dl --verbose -i -u email@domain.tld :ytsubs
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '-i', '-u', '', ':ytsubs']
[debug] Encodings: locale 'UTF-8', fs 'UTF-8', out 'UTF-8', pref: 'UTF-8'
Type account password and press return:
[debug] youtube-dl version 2014.03.10
[debug] Python version 2.7.6 - Linux-3.13.0-16-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] Proxy map: {}
[youtube:subscriptions] Downloading login page
[youtube:subscriptions] Logging in
[youtube:subscriptions] subscriptions feed: Downloading page 1
[download] Downloading playlist: Youtube Subscriptions
[youtube:subscriptions] playlist Youtube Subscriptions: Collected 0 video ids (downloading 0 of them)

any help would be appreciated :(

@phihag
Copy link
Contributor

@phihag phihag commented Mar 10, 2014

@FernandoMiguel Please open a new issue for new problems. That simplifies tracking them, and means that we can close the issue once your problem has been solved. :ytsubs works fine for me though, are you sure that you do have any subscriptions?

@FernandoMiguel
Copy link

@FernandoMiguel FernandoMiguel commented Mar 10, 2014

@phihag sorry about the extra noise.
new ticket at #2542

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