问题描述:

I have used https://kat.cr/json.php?q=test to request Json that list the torrents that where found by the given query. That works fine but, I haven't been able to find any documentation for the api. So I hoped that some of you may know how to request detailed information about a torrent such as its description, file names, comments and so on.

Thanks in advance!

网友答案:

I was also interested in this. I found a NodeJS library floating around: https://github.com/isdampe/kat-api

However digging into the code, it seems to follow your example of making a GET to the url above, and then parsing out the results, for specific params.

What specifically were you looking to do? Was there certain params you only wanted to search for/pull back?

网友答案:

Just type some parameter:

base_url: https://kat.cr/json.php

if search by category:

base_url+"category:'+category_name+' '+keyword;

//seads:
base_url+'seeds:'+seeds;

//tv:
base_url+'tv:'+tvrange+' '+keyword;

//imdb:
base_url+'imdb:'+query_imdb+' '+keyword;

And code from api:

if (typeof query === 'string') {
    queryParams = { q: query };
} else {
    queryParams.q = query.query || '';
    if (query.category) queryParams.q += ' category:' + query.category;
    if (query.min_seeds) queryParams.q += ' seeds:' + query.min_seeds;
    if (query.uploader) queryParams.q += ' user:' + query.uploader;
    if (query.age) queryParams.q += ' age:' + query.age;
    if (query.safety_filter) queryParams.q += ' is_safe:' + query.safety_filter;
    if (query.verified) queryParams.q += ' verified:' + query.verified;
    if (query.language) queryParams.q += ' lang_id:' + filteredLangCode(query.language);
    if (query.imdb) queryParams.q += ' imdb:' + query.imdb.replace(/\D/g,'');
    if (query.tvrage) queryParams.q += ' tv:' + query.tvrage;
    if (query.sort_by) queryParams.field = query.sort_by;
    if (query.order) queryParams.order = query.order;
    if (query.page) queryParams.page = query.page;
}
相关阅读:
Top