[fix] piratebay tld according to wikipedia

This commit is contained in:
Adam Tauber 2015-08-25 22:56:40 +02:00
parent 42ac2c5b56
commit 3f31e1ce6b
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ categories = ['videos', 'music', 'files']
paging = True paging = True
# search-url # search-url
url = 'https://thepiratebay.am/' url = 'https://thepiratebay.se/'
search_url = url + 'search/{search_term}/{pageno}/99/{search_type}' search_url = url + 'search/{search_term}/{pageno}/99/{search_type}'
# piratebay specific type-definitions # piratebay specific type-definitions

View File

@ -15,7 +15,7 @@ class TestPiratebayEngine(SearxTestCase):
params = piratebay.request(query, dicto) params = piratebay.request(query, dicto)
self.assertIn('url', params) self.assertIn('url', params)
self.assertIn(query, params['url']) self.assertIn(query, params['url'])
self.assertIn('piratebay.am', params['url']) self.assertIn('piratebay.se', params['url'])
self.assertIn('0', params['url']) self.assertIn('0', params['url'])
dicto['category'] = 'music' dicto['category'] = 'music'
@ -99,7 +99,7 @@ class TestPiratebayEngine(SearxTestCase):
self.assertEqual(type(results), list) self.assertEqual(type(results), list)
self.assertEqual(len(results), 2) self.assertEqual(len(results), 2)
self.assertEqual(results[0]['title'], 'This is the title') self.assertEqual(results[0]['title'], 'This is the title')
self.assertEqual(results[0]['url'], 'https://thepiratebay.am/this.is.the.link') self.assertEqual(results[0]['url'], 'https://thepiratebay.se/this.is.the.link')
self.assertEqual(results[0]['content'], 'This is the content and should be OK') self.assertEqual(results[0]['content'], 'This is the content and should be OK')
self.assertEqual(results[0]['seed'], 13) self.assertEqual(results[0]['seed'], 13)
self.assertEqual(results[0]['leech'], 334) self.assertEqual(results[0]['leech'], 334)
@ -149,7 +149,7 @@ class TestPiratebayEngine(SearxTestCase):
self.assertEqual(type(results), list) self.assertEqual(type(results), list)
self.assertEqual(len(results), 1) self.assertEqual(len(results), 1)
self.assertEqual(results[0]['title'], 'This is the title') self.assertEqual(results[0]['title'], 'This is the title')
self.assertEqual(results[0]['url'], 'https://thepiratebay.am/this.is.the.link') self.assertEqual(results[0]['url'], 'https://thepiratebay.se/this.is.the.link')
self.assertEqual(results[0]['content'], 'This is the content and should be OK') self.assertEqual(results[0]['content'], 'This is the content and should be OK')
self.assertEqual(results[0]['seed'], 0) self.assertEqual(results[0]['seed'], 0)
self.assertEqual(results[0]['leech'], 0) self.assertEqual(results[0]['leech'], 0)