diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-19 04:48:07 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-19 04:48:07 +0200 |
commit | ffd38f027ed103f7b39ec78c6af0d182774950a4 (patch) | |
tree | e6d88b064a38bb44932674f32ac602efc786468b /module/plugins/internal/SimpleHoster.py | |
parent | Merge pull request #2054 from GammaC0de/patch-1 (diff) | |
download | pyload-ffd38f027ed103f7b39ec78c6af0d182774950a4.tar.xz |
Spare fixes
Diffstat (limited to 'module/plugins/internal/SimpleHoster.py')
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 8307c6236..8dcabdb6c 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -6,7 +6,6 @@ import os import re import time -from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getURL as get_url from module.plugins.internal.Hoster import Hoster, create_getInfo, parse_fileInfo from module.plugins.internal.Plugin import Fail @@ -18,7 +17,7 @@ from module.plugins.internal.utils import (encode, fixup, parse_name, parse_size class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.99" + __version__ = "2.00" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -150,15 +149,15 @@ class SimpleHoster(Hoster): except BadHeader, e: info['error'] = "%d: %s" % (e.code, e.content) - if e.code in (404, 410): - info['status'] = 1 - - elif e.code is 503: - info['status'] = 6 - except Exception: pass + if pyreq.code in (404, 410): + info['status'] = 1 + + elif pyreq.code == 503: + info['status'] = 6 + if html: if cls.OFFLINE_PATTERN and re.search(cls.OFFLINE_PATTERN, html) is not None: info['status'] = 1 @@ -428,7 +427,7 @@ class SimpleHoster(Hoster): def handle_direct(self, pyfile): - self.link = self.is_download(pyfile.url) + self.link = self.isdownload(pyfile.url) def handle_multi(self, pyfile): #: Multi-hoster handler |