diff options
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/BitshareCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/DailymotionCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/FilesMailRu.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/FileserveCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/FreeWayMe.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/HighWayMe.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/OboomCom.py | 16 | ||||
-rw-r--r-- | module/plugins/hoster/OverLoadMe.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/PremiumizeMe.py | 8 | ||||
-rw-r--r-- | module/plugins/hoster/RapidgatorNet.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/RealdebridCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/WrzucTo.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/XDCC.py | 10 |
13 files changed, 39 insertions, 39 deletions
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index 951920444..54f413d13 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class BitshareCom(SimpleHoster): __name__ = "BitshareCom" __type__ = "hoster" - __version__ = "0.59" + __version__ = "0.60" __status__ = "testing" __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/)?(?(1)|\?f=)(?P<ID>\w+)(?(1)/(?P<NAME>.+?)\.html)' @@ -114,7 +114,7 @@ class BitshareCom(SimpleHoster): self.retry() #: Resolve captcha - if captcha is 1: + if captcha == 1: self.log_debug("File is captcha protected") self.captcha = ReCaptcha(self.pyfile) diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py index 6c8f21766..119373b08 100644 --- a/module/plugins/hoster/DailymotionCom.py +++ b/module/plugins/hoster/DailymotionCom.py @@ -44,7 +44,7 @@ def get_info(urls): class DailymotionCom(Hoster): __name__ = "DailymotionCom" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*video/(?P<ID>[\w^_]+)' @@ -112,10 +112,10 @@ class DailymotionCom(Hoster): def check_info(self, pyfile): pyfile.name, pyfile.size, pyfile.status, pyfile.url = get_info([pyfile.url])[0] - if pyfile.status is 1: + if pyfile.status == 1: self.offline() - elif pyfile.status is 6: + elif pyfile.status == 6: self.temp_offline() diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 68aa24149..04a91fe94 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -33,7 +33,7 @@ def get_info(urls): class FilesMailRu(Hoster): __name__ = "FilesMailRu" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.39" __status__ = "testing" __pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+' @@ -105,7 +105,7 @@ class FilesMailRu(Hoster): #: so i set it to check every download because sometimes there are downloads #: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file #: (Loading 100MB in to ram is not an option) - if self.scan_download({'html': "<meta name="}, read_size=50000) is "html": + if self.scan_download({'html': "<meta name="}, read_size=50000) == "html": self.log_info(_("There was HTML Code in the Downloaded File (%s)...redirect error? The Download will be restarted." % self.pyfile.name)) self.retry() diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index a693cb58a..cb39311bc 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -31,7 +31,7 @@ def get_info(plugin, urls): class FileserveCom(Hoster): __name__ = "FileserveCom" __type__ = "hoster" - __version__ = "0.66" + __version__ = "0.67" __status__ = "testing" __pattern__ = r'http://(?:www\.)?fileserve\.com/file/(?P<ID>[^/]+)' @@ -69,7 +69,7 @@ class FileserveCom(Hoster): def process(self, pyfile): pyfile.name, pyfile.size, status, self.url = check_file(self, [self.url])[0] - if status is not 2: + if status != 2: self.offline() self.log_debug("File Name: %s Size: %d" % (pyfile.name, pyfile.size)) diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py index 1cdf00842..edf0a6c0c 100644 --- a/module/plugins/hoster/FreeWayMe.py +++ b/module/plugins/hoster/FreeWayMe.py @@ -43,7 +43,7 @@ class FreeWayMe(MultiHoster): if 'location' in header: headers = self.load(header.get('location'), just_header=True) - if headers['code'] is 500: + if headers['code'] == 500: #: Error on 2nd stage self.log_error(_("Error [stage2]")) else: diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py index a9d4db373..029cb7fdc 100644 --- a/module/plugins/hoster/HighWayMe.py +++ b/module/plugins/hoster/HighWayMe.py @@ -9,7 +9,7 @@ from module.plugins.internal.misc import seconds_to_midnight class HighWayMe(MultiHoster): __name__ = "HighWayMe" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __pattern__ = r'https?://.+high-way\.my' @@ -30,7 +30,7 @@ class HighWayMe(MultiHoster): def check_errors(self): - if self.data.get('code') is 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it. + if self.data.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it. self.account.relogin() self.retry() diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index bb823256f..ef2cdbf29 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -13,7 +13,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha class OboomCom(Hoster): __name__ = "OboomCom" __type__ = "hoster" - __version__ = "0.42" + __version__ = "0.43" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})' @@ -65,7 +65,7 @@ class OboomCom(Hoster): else: apiUrl = "http://www.oboom.com/1.0/guestsession" result = self.load_url(apiUrl) - if result[0] is 200: + if result[0] == 200: self.session_token = result[1] else: self.fail(_("Could not retrieve token for guest session. Error code: %s") % result[0]) @@ -83,14 +83,14 @@ class OboomCom(Hoster): result = self.load_url(apiUrl, params) - if result[0] is 200: + if result[0] == 200: self.download_token = result[1] self.download_auth = result[2] self.captcha.correct() self.wait(30) else: - if result[0] is 403: + if result[0] == 403: if result[1] == -1: #: Another download is running self.set_wait(15 * 60) else: @@ -100,7 +100,7 @@ class OboomCom(Hoster): self.wait() self.retry(5) - elif result[0] is 400 and result[1] == "forbidden": + elif result[0] == 400 and result[1] == "forbidden": self.retry(5, 15 * 60, _("Service unavailable")) self.retry_captcha() @@ -111,7 +111,7 @@ class OboomCom(Hoster): params = {'token': token, 'items': fileId, 'http_errors': 0} result = self.load_url(apiUrl, params) - if result[0] is 200: + if result[0] == 200: item = result[1][0] if item['state'] == "online": self.file_size = item['size'] @@ -132,10 +132,10 @@ class OboomCom(Hoster): params['auth'] = self.download_auth result = self.load_url(apiUrl, params) - if result[0] is 200: + if result[0] == 200: self.download_domain = result[1] self.download_ticket = result[2] - elif result[0] is 421: + elif result[0] == 421: self.retry(wait=result[2] + 60, msg=_("Connection limit exceeded")) else: self.fail(_("Could not retrieve download ticket. Error code: %s") % result[0]) diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index 07d906b15..fad4c8b81 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -10,7 +10,7 @@ from module.plugins.internal.misc import json, parse_size class OverLoadMe(MultiHoster): __name__ = "OverLoadMe" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __pattern__ = r'https?://.*overload\.me/.+' @@ -40,7 +40,7 @@ class OverLoadMe(MultiHoster): self.log_debug(data) - if data['error'] is 1: + if data['error'] == 1: self.log_warning(data['msg']) self.temp_offline() else: diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py index 1f98aa0fe..2951ee49d 100644 --- a/module/plugins/hoster/PremiumizeMe.py +++ b/module/plugins/hoster/PremiumizeMe.py @@ -7,7 +7,7 @@ from module.plugins.internal.misc import json class PremiumizeMe(MultiHoster): __name__ = "PremiumizeMe" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate @@ -48,7 +48,7 @@ class PremiumizeMe(MultiHoster): #: Check status and decide what to do status = data['status'] - if status is 200: + if status == 200: if 'filename' in data['result']: self.pyfile.name = data['result']['filename'] @@ -58,10 +58,10 @@ class PremiumizeMe(MultiHoster): self.link = data['result']['location'] return - elif status is 400: + elif status == 400: self.fail(_("Invalid url")) - elif status is 404: + elif status == 404: self.offline() elif status >= 500: diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index 27fb4fda0..50bbb0414 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -15,7 +15,7 @@ from module.plugins.internal.misc import json class RapidgatorNet(SimpleHoster): __name__ = "RapidgatorNet" __type__ = "hoster" - __version__ = "0.39" + __version__ = "0.40" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+' @@ -82,10 +82,10 @@ class RapidgatorNet(SimpleHoster): status = e.code msg = e - if status is 200: + if status == 200: return json_data['response'] - elif status is 423: + elif status == 423: self.account.empty() self.retry() diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 41208df89..57285560c 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -11,7 +11,7 @@ from module.plugins.internal.misc import json, parse_size class RealdebridCom(MultiHoster): __name__ = "RealdebridCom" __type__ = "hoster" - __version__ = "0.72" + __version__ = "0.73" __status__ = "testing" __pattern__ = r'https?://((?:www\.|s\d+\.)?real-debrid\.com/dl/|[\w^_]\.rdb\.so/d/)[\w^_]+' @@ -41,7 +41,7 @@ class RealdebridCom(MultiHoster): self.log_debug("Returned Data: %s" % data) - if data['error'] is not 0: + if data['error'] != 0: if data['message'] == "Your file is unavailable on the hoster.": self.offline() else: diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py index dc0646e4c..8ac79798b 100644 --- a/module/plugins/hoster/WrzucTo.py +++ b/module/plugins/hoster/WrzucTo.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class WrzucTo(SimpleHoster): __name__ = "WrzucTo" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __pattern__ = r'http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?linki/\w+))' @@ -37,7 +37,7 @@ class WrzucTo(SimpleHoster): def handle_free(self, pyfile): data = dict(re.findall(r'(md5|file): "(.*?)"', self.data)) - if len(data) is not 2: + if len(data) != 2: self.error(_("No file ID")) self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) @@ -48,7 +48,7 @@ class WrzucTo(SimpleHoster): self.data = self.load("http://www.wrzuc.to/ajax/server/download_link", post={'file': data['file']}) data.update(re.findall(r'"(download_link|server_id)":"(.*?)"', self.data)) - if len(data) is not 4: + if len(data) != 4: self.error(_("No download URL")) self.link = "http://%s.wrzuc.to/pobierz/%s" % (data['server_id'], data['download_link']) diff --git a/module/plugins/hoster/XDCC.py b/module/plugins/hoster/XDCC.py index 3985a050c..8fdb704d9 100644 --- a/module/plugins/hoster/XDCC.py +++ b/module/plugins/hoster/XDCC.py @@ -14,7 +14,7 @@ from module.plugins.internal.misc import fsjoin class XDCC(Hoster): __name__ = "XDCC" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.39" __status__ = "testing" __config__ = [("nick", "str", "Nickname", "pyload"), @@ -48,7 +48,7 @@ class XDCC(Hoster): else: errno = e.args[0] - if errno is 10054: + if errno == 10054: self.log_debug("Server blocked our ip, retry in 5 min") self.wait(300) continue @@ -72,9 +72,9 @@ class XDCC(Hoster): temp = server.split(':') ln = len(temp) - if ln is 2: + if ln == 2: host, port = temp - elif ln is 1: + elif ln == 1: host, port = temp[0], 6667 else: self.fail(_("Invalid hostname for IRC Server: %s") % server) @@ -139,7 +139,7 @@ class XDCC(Hoster): self.fail(_("IRC-Error: %s") % line) msg = line.split(None, 3) - if len(msg) is not 4: + if len(msg) != 4: continue msg = { |