Open Aspartaco opened 3 years ago
Thanks for the suggestion. This is the first I've heard about Odysee, but it looks interesting. I have some other things I'm working on currently, but I may get around to this eventually.
Do you by chance know if there is an Odysee API, or would I have to go through some blockchain thing to retrieve the video likes/dislikes stats? I tried doing a quick search, but haven't been able to figure it out yet.
Thanks for your response Elliot. You should be able to contact the developers of Odysee at hello@lbry.com. Lbry is the technology behind Odysee and the CEO is Jeremy Kauffman. https://github.com/lbryio I'd ask myself but I think you have a better chance of success maybe of convincing them to create such API if it doesn't exist.
Okay, I just emailed hello@lbry.com asking if they had an API available. I'll let you know when I hear back from them.
I emailed back and forth several times with someone named Tom at LBRY and he was very helpful. They have an internal API that isn't currently documented, but he told me the specific API calls that I could use to retrieve the likes/dislikes data. The extension could start out by looking at the HTML code around the thumbnail to get the URL of the video, and then the video URL could be used to retrieve the claim_id for that video, and then the claim_id could be used to retrieve the likes/dislikes data for that video.
To get the claim_ids for a set of video URLs, this type of POST request can be used:
Post URL:
https://api.lbry.tv/api/v1/proxy
Post body:
{"jsonrpc":"2.0","method":"resolve","params":{"urls": ["@GDQuest:f/getting-started-with-godot's-signals:1"]}, "id":1}
And then to get the likes/dislikes data for a set of claim_ids, this type of POST request can be used:
Post URL:
https://api.lbry.com/reaction/list?claim_ids=114b8a115c714102724aa1b3a6f47084df8f64a0
So it should be possible to make a similar extension for Odysee. However, as I mentioned before, I am currently busy with another project and will not be able to implement this myself in the near future. But if you or anyone else that comes across these comments wants to go ahead and create a version of this extension that works with Odysee, they are more than welcome to since this extension is open source. And if no one has implemented it by the time I get around to finishing my other project, I may take the time to implement it myself.
There are also two other reasons I might want to wait before implementing this extension:
I'll leave this issue open in case anyone wants to discuss this idea further.
Hello, can you make it work with odysee.com or make a version for it? I would really appreciate it. Thanks in any case for all your great work in this extension.