Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Download all youtube favorites with youtube-dl script

133 views
Skip to first unread message

Bill

unread,
Sep 26, 2013, 11:13:35 AM9/26/13
to
I have been using the script youtube-dl http://rg3.github.io/youtube-dl/

And I was wondering if there is a way to download all of a user's
favorites or uploads.

The script has a functionality to download all videos in a txt file. So
if there is a way using the youtube API or JSON (none of which I am
familiar with) to bring up a list of all these videos then it'd be a
simple case putting these urls into a file.

The problem is youtube displays favorites or user uploads in pages or
infinite scroll. So it is difficult to access them by the BeautifulSoup
module.


What do you suggest?

Joel Goldstick

unread,
Sep 26, 2013, 11:21:12 AM9/26/13
to Bill, pytho...@python.org
Have you looked at the youtube API?  That would be better than screen scraping.  https://developers.google.com/youtube/getting_started


--

Philipp Hagemeister

unread,
Sep 26, 2013, 11:35:02 AM9/26/13
to Bill, pytho...@python.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Bill,

the best way to ask for features or file bugs on youtube-dl is asking
us at http://github.com/rg3/youtube-dl/issues . Luckily, I this list
from time to time ;)

Simply use

youtube-dl --username us...@gmail.com --password secret :ytfav

Best,

Philipp
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iQIcBAEBCgAGBQJSRFQmAAoJENtLVMukgmoYaz0P/ifoPqcx4dpShXyigwGxzhsa
ht8sjIP8n3bNJ+J7Jvx0uM6Sv/Hu/U1CC09G1pT9nquHDYYvmko+MoBkXbc8JmlC
R0qPhX0I2xGH9G1EL+83J4zzte3K7p5ErLY1V1S9cWuBKot16eKtrxhIgWxTMfE1
l93az4Uz4YLzUPYEXSO7pNX9cvxyrEjsqSJE3Jftn5ZqbUO46M+7gMKG2g46C/W4
IQtg2v9cHE3xKV5c+wCFjjIHtOGg+leOTMFdiD6oIa/uNfV/3tzpiyQ1e2QgyrvU
UK4zz3TxqxWswDTrxRdc7fFNAGoNSrxU2hwyvjc/CGehORv7ktBjJJbtt3PfvHsi
nov+OEIToDFTO1nCzQ39qQP0Ibl0LpNbvJGWyJqubFsZd0uiU1EwONXFchNwHeil
Yce4DT8Tzf4zv6y3YNJCz1RCM1G308vQav539w6D7vfIUc5F28gnWKkd5NIcCpyu
URVWp0HxV7d+kCekbxhnd+Ah/XvsrHhkI3cxOHvc1QjGwToRWawJQT0LD72E6PqW
MmnOUTZhrxebyAx1HEt45l19fuW/TfwCWWzAtRscr8uFLFf0/Hwm41tSo8FjxqK2
OVZAckmVYIKP0F+u6hcSg/INl6rs6R+Co4/S8aFdKh2N16wmwQ7hevoTIpXIFwwK
hkpwAUdlQxIWzSe8uJMV
=nRz7
-----END PGP SIGNATURE-----

Bill

unread,
Sep 26, 2013, 2:14:33 PM9/26/13
to
Joel Goldstick wrote:
>
>
>
> On Thu, Sep 26, 2013 at 11:13 AM, Bill <Bi...@bill.com
> <mailto:Bi...@bill.com>> wrote:
>
> I have been using the script youtube-dl
> http://rg3.github.io/youtube-__dl/ <http://rg3.github.io/youtube-dl/>
>
> And I was wondering if there is a way to download all of a user's
> favorites or uploads.
>
> The script has a functionality to download all videos in a txt file.
> So if there is a way using the youtube API or JSON (none of which I
> am familiar with) to bring up a list of all these videos then it'd
> be a simple case putting these urls into a file.
>
> The problem is youtube displays favorites or user uploads in pages
> or infinite scroll. So it is difficult to access them by the
> BeautifulSoup module.
>
>
> What do you suggest?
> --
> https://mail.python.org/__mailman/listinfo/python-list
> <https://mail.python.org/mailman/listinfo/python-list>
>
>
> Have you looked at the youtube API? That would be better than screen
> scraping. https://developers.google.com/youtube/getting_started
>
>
> --
> Joel Goldstick
> http://joelgoldstick.com

I remember looking at this a while ago. These are the relevant sections
of the API:

https://developers.google.com/youtube/2.0/developers_guide_protocol?hl=en#User_Uploaded_Videos

https://developers.google.com/youtube/2.0/developers_guide_protocol?hl=en#Favorite_Videos

The problem with the API is that with both of these, it only brings up
25 videos e.g. https://gdata.youtube.com/feeds/api/users/scooby1961/uploads

Unless I'm missing something? There must be a way to bring up all of
them on one page right? Or at least cycle through the rest of them.

Same problem with favorties:
https://gdata.youtube.com/feeds/api/users/adambuxton/favorites/

Bill

unread,
Sep 26, 2013, 2:15:18 PM9/26/13
to
If I can't figure this out myself, I'll be sure to do that.

Cheers

MRAB

unread,
Sep 26, 2013, 2:33:35 PM9/26/13
to pytho...@python.org
You _are_ missing something. That section of "#User_Uploaded_Videos"
mentions the parameters "start-index" and "max-results".

Thomas Kandler

unread,
Sep 27, 2013, 3:27:55 AM9/27/13
to
Regarding the uploads: most profiles do have something called 'Popular
Uploads' or 'Recent Uploads'. Hover with the mouse over the link, a
'play'-Button appears, click it, copy the URL (should have a &list
parameter), paste the URL in youtube-dl (or a txt-file) and it will
fetch all videos.

I am not sure if this works for favorites, too, but that's the way I do it.

Bill

unread,
Sep 27, 2013, 3:50:30 PM9/27/13
to
Hi.

A screenshot would help me locate it.

Cheers

Thomas Kandler

unread,
Sep 27, 2013, 4:19:45 PM9/27/13
to
On 27.09.2013 21:50, Bill wrote:
> Hi.
>
> A screenshot would help me locate it.
>
> Cheers

Sure. http://i.imgur.com/LvrNZYO.png

I don't thing *every* profile has this, but as I said, I use youtube-dl
quite often this way.

Best
0 new messages