#根据imdb获取相关信息
def getinfobyimdb():
imdb = input("请输入imdb:")
url = "https://api.antitor.com/torrent/list/"
new_url = url + "imdb/"+ imdb + "?key="+ key
res = requests.get(new_url)
json_data = json.loads(res.text)
for i in json_data['torrents']:
print(i['name'])
#通过hash查询种子被下载的ip地址以及所在国家
def getipinfobyhash():
#https://api.antitor.com/torrent/downloads/
url = "https://api.antitor.com/torrent/downloads/"
day_data = input("请输入查询日期:")
info_hash = input("请输入种子hash:")
new_url = url+info_hash+"?key="+key+"&day="+day_data+"&days=11&short=false"
res = requests.get(new_url)
json_data = json.loads(res.text)
if len(json_data) == 2:
print("获取失败!",json_data['message'])
else:
for i in json_data['peers']:
print("ip地址:",i['ip'], "国家/地区",i['countryCode'])