[weboob] [PATCH] piratebay: New URL

Laurent Bachelier laurent at bachelier.name
Mon May 6 00:41:30 CEST 2013


diff --git a/modules/piratebay/browser.py b/modules/piratebay/browser.py
index c786717..c99d0b8 100644
--- a/modules/piratebay/browser.py
+++ b/modules/piratebay/browser.py
@@ -30,24 +30,24 @@ __all__ = ['PiratebayBrowser']
 
 
 class PiratebayBrowser(BaseBrowser):
-    DOMAIN = 'thepiratebay.se'
+    DOMAIN = 'thepiratebay.sx'
     PROTOCOL = 'https'
     ENCODING = 'utf-8'
     USER_AGENT = BaseBrowser.USER_AGENTS['wget']
-    PAGES = {'https://thepiratebay.se/': IndexPage,
-             'https://thepiratebay.se/search/.*/0/7/0': TorrentsPage,
-             'https://thepiratebay.se/torrent/.*': TorrentPage
+    PAGES = {'https://thepiratebay.sx/': IndexPage,
+             'https://thepiratebay.sx/search/.*/0/7/0': TorrentsPage,
+             'https://thepiratebay.sx/torrent/.*': TorrentPage
              }
 
     def iter_torrents(self, pattern):
-        self.location('https://thepiratebay.se/search/%s/0/7/0' % urllib.quote_plus(pattern.encode('utf-8')))
+        self.location('https://thepiratebay.sx/search/%s/0/7/0' % urllib.quote_plus(pattern.encode('utf-8')))
 
         assert self.is_on_page(TorrentsPage)
         return self.page.iter_torrents()
 
     def get_torrent(self, id):
         try:
-            self.location('https://thepiratebay.se/torrent/%s/' % id)
+            self.location('https://thepiratebay.sx/torrent/%s/' % id)
         except BrowserHTTPNotFound:
             return
         if self.is_on_page(TorrentPage):
-- 
1.8.1.5



More information about the weboob mailing list