Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. url = "https://nyaa.pantsu.cat/api"
  2. response = requests.get(url)
  3. data = json.loads(response.text)
  4. for i in data["torrents"]:
  5. path = "torrents/" + i["hash"].lstrip()+".torrent"
  6. if pt.isfile(path):
  7. print("file exists")
  8. else:
  9. p = multiprocessing.Process(target=magnet2torrent, args=(i["magnet"]+"&tr=http://nyaa.tracker.wf:7777/announce&tr=http://anidex.moe:6969/announce", path))
  10. jobs.append(p)
  11. p.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement