Open lozbrown opened 7 years ago
Is there a protocol, format, or any kind of standards transdeoid-search requires or is it simply fine with custom solutions?
I'll probably implement a RESTful API with JSON formatted messages, but I'm open to suggestions for interoperability. =)
No specific standard is required. Some use a json api (much preferred), some custom RSS feeds and some have to rely on html scraping. If you are yet to develop one, certainly go for a RESTful JSON API.
Interesting project BTW!
@boramalper , see at "OpenAPI Specification" for recommendations how write API easy to use for general API interoperability.
Done xD
Json-API with search and limit output (limit can be max. 100): https://dht.bittor.ch/api?search=ubuntu&limit=3
Json-API latest 1000: https://dht.bittor.ch/api
Base-page search: https://dht.bittor.ch/?search=ubuntu
Base-RSS: https://dht.bittor.ch/rss
Base-RSS search: https://dht.bittor.ch/rss?search=ubuntu
Base-RSS search with limits number of output: https://dht.bittor.ch/rss?search=ubuntu&limit=5
Basic magnet view: https://dht.bittor.ch/?id=145916
Basic magnet files view: https://dht.bittor.ch/?files=145916
Recently discovered files: https://dht.bittor.ch/files
Stats page: https://dht.bittor.ch/stats
Just clicked on https://dht.bittor.ch/api?search=ubuntu&limit=3 but it doesn't seem to produce any valid JSON output though.
Also, a sorting on at least the number of peers and/or availability would be good. The ubuntu search for example doesn't produce very useable results.
I would definitely wait before using the API as it is not yet standardized across different magnetico web-interface implementations. I currently don't have time, but I'll discuss with @scriptzteam and possibly others to create a detailed specification of the API, which will ensure interoperability between different implementations. =)
@erickok how not valid json ??
{
"dht_results": [{"ID":"224352","NAME":"ubuntu-14.10-desktop-amd64.iso","MAGNET":"magnet:?xt=urn:btih:b415c913643e5ff49fe37d304bbb5e6e11ad5101&dn=ubuntu-14.10-desktop-amd64.iso","SIZE":"1.08GB","DISCOVERED":"2017-04-25 18:05:25" }, {"ID":"223681","NAME":"ubuntu-mate-14.04.2-LTS-desktop-amd64.iso","MAGNET":"magnet:?xt=urn:btih:f84b7654d35aa190a4c8bea3b64a92805641c961&dn=ubuntu-mate-14.04.2-LTS-desktop-amd64.iso","SIZE":"1.05GB","DISCOVERED":"2017-04-25 17:29:36" }, {"ID":"221435","NAME":"Ubuntu для начинающих 2015.pdf","MAGNET":"magnet:?xt=urn:btih:f53c73bd4b667f46e6a039a9888fba0eb23fae18&dn=Ubuntu+%D0%B4%D0%BB%D1%8F+%D0%BD%D0%B0%D1%87%D0%B8%D0%BD%D0%B0%D1%8E%D1%89%D0%B8%D1%85+2015.pdf","SIZE":"16.68MB","DISCOVERED":"2017-04-25 15:21:36" }, {}]}
http://jsonlint.com/ ---> Results ---> Valid JSON https://jsonformatter.curiousconcept.com/ ---> Valid JSON (RFC 4627) http://www.jsonschemavalidator.net/ ---> No errors found. JSON validates against the schema
Ubuntu search was just sample, you can always try https://dht.bittor.ch/api?search=rarbg ;)
Not possible for now to sort it by peers/availability as magnetico does not support it now :)
@boramalper will be more than happy to help on API :)
Now it does but when I checked it didn't produce proper JSON. Maybe you were working on it?
I'll wait a bit until a standardized and documented API is fleshed out, if you don't mind.
Hey @erickok! I'd kindly suggest waiting for the v0.7.0 release before implementing it. In the meanwhile, any feedback would be greatly appreciated: https://github.com/boramalper/magnetico/issues/162
Magnetico is an emerging project to essentially host your own torrent search engine
https://github.com/boramalper/magnetico
It would be useful to add my own (and maybe my friends) magnetico sites to transdroid so I could search and add the magnets to my torrent client from transdroid.