Revert "piratebay: New URL"

This reverts commit 677ce3961d.

https://torrentfreak.com/new-pirate-bay-greenland-domains-about-to-be-seized-130410/
This commit is contained in:
Laurent Bachelier 2013-04-11 01:38:16 +02:00
commit 48f8f1b1e3

View file

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