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

can I download my likes? #11

Closed
AdventurerRussia opened this issue Oct 8, 2020 · 3 comments
Closed

can I download my likes? #11

AdventurerRussia opened this issue Oct 8, 2020 · 3 comments

Comments

@AdventurerRussia
Copy link

I'm sorry, but I only found how to download the channel, but I have 1500 thousand koubs in likes, is it possible to download them? or get links to all of them? To download them later.

@HelpSeeker
Copy link
Owner

Not sure whether I'm going crazy or I just missed this issue for more than a year, despite regularly visiting the repo. If the latter, then my deepest apologies.

In any case, I don't plan on introducing any features that require authentication. Sorry for the inconvenience.

@retifrav
Copy link

I got to this issue just today, also wondering about saving the Coub likes, and I was actually typing an answer to @AdventurerRussia, when all of the sudden @HelpSeeker posted his own reply! Quite amazing timing, that we both got here more than a year later at the same moment.

Anyway, here's what I was about to post.

Since it's user's likes, getting them would require authenticating as that user, and sadly Coub doesn't seem to provide API keys (anymore?), so I reckon that is the reason why this functionality wasn't implemented in CoubDownloader.

To answer your other question, it is indeed possible to get a list of your likes URLs and to feed that list to CoubDownloader: if you open this URL in your browser (being authenticated on Coub) - https://coub.com/api/v2/timeline/likes?all=true&order_by=date&page=1 - then you should get a JSON object with your liked coubs, which you can easily parse for download URLs and make a list of them.

One thing to note here is that this is a paginated result, so you'll need to iterate through total_pages number of results by changing page=1 query parameter. Another thing to note here is that to work with this from a script or wherever you'll need your authentication cookie header value - you can get it from your browser console.

As I needed to do the same myself (I wanted to save all my liked coubs locally, just in case), I wrote a silly script that does exactly that - fetches URLs of all my liked coubs: https://github.com/retifrav/python-scripts/blob/master/coub-likes-list/coub-likes-list.py
Having replaced aythenticationCookie and whereToSaveLikesList values you'll be able to run it to generate the list of URLs and then call CoubDownloader:

$ python ./coub-likes-list.py
$ python /path/to/coub-downloader/coub.py /tmp/my-coub-likes.txt

I could/should probably also add CLI interface and actually calling CoubDownloader from the script too, but I figured that'd be a bit of an overkill for a one-time task like this.

@HelpSeeker HelpSeeker pinned this issue Dec 25, 2021
@AdventurerRussia
Copy link
Author

by the way, there is a script that another person created, you enter a token there and it saves the list immediately in the script folder

cmd
python.exe parse-likes.py "token"

https://gist.github.com/AlukardBF/10a257ecaf2fd7d048b06592f48ad495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants