Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
History feed download is not downloading properly #1845
Comments
|
How many videos does your history contains? on my account (which I used to implement it) I only have 151, so I didn't test it with many videos. |
|
This is likely a very large viewing history. What do you need from the AJAX calls? Just the URLs? Or any specific HTTP header as well? |
|
Fixed, I managed to reproduce it. Now we obtain the |
|
I forgot to mention, if you try it (using the last commit in the repo) be aware that there seems to be a bug in the YouTube interface: it will say you have more videos in your history than the actual number (for example I had only 4 videos but it said there were 10 videos). |
|
This fix has been added into youtube-dl 2013.11.28. Type |
|
It works! Is there an easy way to nicely export the data instead of having youtube-dl download thousands of videos? |
|
yuvadm you can output the video to console using
i have 10K videos in my history (i think its the limit) so i cant check if it works, |
|
scratch that, it does work |
|
@yuvadm if you want the whole info for all the videos, the options given by @yoshco will work. #!/usr/bin/env python
import youtube_dl
params = {
'quiet': True,
'usenetrc': True,
# or use
# 'username': foo,
# 'password': bar,
}
with youtube_dl.YoutubeDL(params) as ydl:
history_ie = youtube_dl.extractor.YoutubeHistoryIE(ydl)
result = history_ie.extract(':ythistory')
for entry in result['entries']:
# It will print only the video_id
print(entry['url'])The script will need to import |
|
@jaimeMF I don't think you need to write a script, you can just pass in |
|
@phihag You're right, if you want a built-in solution, you can use |
|
How can I use the script from jaimeMF to get the TITLE and the URL. When I change print(entry['url']) to print(entry['title']) it tells me invalid argument or something like that. |
Continuing the new viewing history feature in #1821 -
When running the following command:
The result is:
with the following files created:
As you can see (and can be confirmed with a hash check), all files beside the second dump are exactly the same. I let this run for a long time and it got to a few thousand pages, so this is likely a bug.