piratebay: Use new domain names
.se redirects to those. http://torrentfreak.com/pirate-bay-loses-new-domain-name-hydra-lives-on-150522/ Take over maintainership since the previous maintainer isn't active.
This commit is contained in:
parent
5852bd5ef9
commit
273e15928d
2 changed files with 12 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2010-2011 Julien Veyssier
|
# Copyright(C) 2010-2015 Julien Veyssier, Laurent Bachelier
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
@ -18,23 +18,28 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from urlparse import urlsplit
|
import random
|
||||||
import urllib
|
import urllib
|
||||||
|
from urlparse import urlsplit
|
||||||
|
|
||||||
from weboob.deprecated.browser import Browser, BrowserHTTPNotFound
|
from weboob.deprecated.browser import Browser, BrowserHTTPNotFound
|
||||||
|
|
||||||
from .pages.index import IndexPage
|
from .pages.index import IndexPage
|
||||||
from .pages.torrents import TorrentsPage, TorrentPage
|
from .pages.torrents import TorrentPage, TorrentsPage
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['PiratebayBrowser']
|
__all__ = ['PiratebayBrowser']
|
||||||
|
|
||||||
|
|
||||||
class PiratebayBrowser(Browser):
|
class PiratebayBrowser(Browser):
|
||||||
ENCODING = 'utf-8'
|
ENCODING = 'utf-8'
|
||||||
|
DOMAINS = ['thepiratebay.vg',
|
||||||
|
'thepiratebay.la',
|
||||||
|
'thepiratebay.am',
|
||||||
|
'thepiratebay.mn',
|
||||||
|
'thepiratebay.gd']
|
||||||
|
|
||||||
def __init__(self, url, *args, **kwargs):
|
def __init__(self, url, *args, **kwargs):
|
||||||
url = url or 'https://thepiratebay.se/'
|
url = url or 'https://%s/' % random.choice(self.DOMAINS)
|
||||||
url_parsed = urlsplit(url)
|
url_parsed = urlsplit(url)
|
||||||
self.PROTOCOL = url_parsed.scheme
|
self.PROTOCOL = url_parsed.scheme
|
||||||
self.DOMAIN = url_parsed.netloc
|
self.DOMAIN = url_parsed.netloc
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ __all__ = ['PiratebayModule']
|
||||||
|
|
||||||
class PiratebayModule(Module, CapTorrent):
|
class PiratebayModule(Module, CapTorrent):
|
||||||
NAME = 'piratebay'
|
NAME = 'piratebay'
|
||||||
MAINTAINER = u'Julien Veyssier'
|
MAINTAINER = u'Laurent Bachelier'
|
||||||
EMAIL = 'julien.veyssier@aiur.fr'
|
EMAIL = 'laurent@bachelier.name'
|
||||||
VERSION = '1.1'
|
VERSION = '1.1'
|
||||||
DESCRIPTION = 'The Pirate Bay BitTorrent tracker'
|
DESCRIPTION = 'The Pirate Bay BitTorrent tracker'
|
||||||
LICENSE = 'AGPLv3+'
|
LICENSE = 'AGPLv3+'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue