logo

searx

My custom branche(s) on searx, a meta-search engine
commit: cd819ae74bfc204c86f1b3d1588859ec8f7d8240
parent: b25dccd1ae818ed7fe27b3f6dfb80a755599ab12
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Mon, 21 May 2018 18:20:12 +0200

Merge pull request #1304 from kvch/fix-piratebay-url

Fix piratebay URL

Diffstat:

Msearx/engines/piratebay.py2+-
Mtests/unit/engines/test_piratebay.py6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/searx/engines/piratebay.py b/searx/engines/piratebay.py @@ -18,7 +18,7 @@ categories = ['videos', 'music', 'files'] paging = True # search-url -url = 'https://thepiratebay.se/' +url = 'https://thepiratebay.org/' search_url = url + 'search/{search_term}/{pageno}/99/{search_type}' # piratebay specific type-definitions diff --git a/tests/unit/engines/test_piratebay.py b/tests/unit/engines/test_piratebay.py @@ -15,7 +15,7 @@ class TestPiratebayEngine(SearxTestCase): params = piratebay.request(query, dicto) self.assertIn('url', params) self.assertIn(query, params['url']) - self.assertIn('piratebay.se', params['url']) + self.assertIn('piratebay.org', params['url']) self.assertIn('0', params['url']) dicto['category'] = 'music' @@ -99,7 +99,7 @@ class TestPiratebayEngine(SearxTestCase): self.assertEqual(type(results), list) self.assertEqual(len(results), 2) self.assertEqual(results[0]['title'], 'This is the title') - self.assertEqual(results[0]['url'], 'https://thepiratebay.se/this.is.the.link') + self.assertEqual(results[0]['url'], 'https://thepiratebay.org/this.is.the.link') self.assertEqual(results[0]['content'], 'This is the content and should be OK') self.assertEqual(results[0]['seed'], 13) self.assertEqual(results[0]['leech'], 334) @@ -149,7 +149,7 @@ class TestPiratebayEngine(SearxTestCase): self.assertEqual(type(results), list) self.assertEqual(len(results), 1) self.assertEqual(results[0]['title'], 'This is the title') - self.assertEqual(results[0]['url'], 'https://thepiratebay.se/this.is.the.link') + self.assertEqual(results[0]['url'], 'https://thepiratebay.org/this.is.the.link') self.assertEqual(results[0]['content'], 'This is the content and should be OK') self.assertEqual(results[0]['seed'], 0) self.assertEqual(results[0]['leech'], 0)