From 127bf8bdfbc7e70a50f92a455920716920d984b1 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 6 Sep 2017 19:27:00 +0200 Subject: [PATCH] replace torcache.net with itorrents.org cache --- pirate/torrent.py | 2 +- tests/test_torrent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pirate/torrent.py b/pirate/torrent.py index 5126b92..0eb2131 100644 --- a/pirate/torrent.py +++ b/pirate/torrent.py @@ -154,7 +154,7 @@ def remote(printer, pages, category, sort, mode, terms, mirror): def get_torrent(info_hash): - url = 'http://torcache.net/torrent/{:X}.torrent' + url = 'http://itorrents.org/torrent/{:X}.torrent' req = request.Request(url.format(info_hash), headers=pirate.data.default_headers) req.add_header('Accept-encoding', 'gzip') diff --git a/tests/test_torrent.py b/tests/test_torrent.py index 66a50dd..a7236c5 100755 --- a/tests/test_torrent.py +++ b/tests/test_torrent.py @@ -116,7 +116,7 @@ class TestTorrent(unittest.TestCase): request_obj = MockRequest() with patch('urllib.request.Request', return_value=request_obj) as request: pirate.torrent.get_torrent(100000000000000) - request.assert_called_once_with('http://torcache.net/torrent/5AF3107A4000.torrent', headers=pirate.data.default_headers) + request.assert_called_once_with('http://itorrents.org/torrent/5AF3107A4000.torrent', headers=pirate.data.default_headers) urlopen.assert_called_once_with(request_obj, timeout=pirate.data.default_timeout) def test_remote(self):