diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2012-11-14 22:22:04 +0100 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2012-11-14 22:22:04 +0100 |
commit | 6b5130641a7b4272956fa69ca5517884300ddb0c (patch) | |
tree | a5aaf799d74c3d54ba8855cdb9720a01feb68395 /module/plugins/hoster/NetloadIn.py | |
parent | Update the error codes (diff) | |
parent | youtube config options, resume - closed #717, ul.to - closed #716, (diff) | |
download | pyload-6b5130641a7b4272956fa69ca5517884300ddb0c.tar.xz |
Merged in irrenhaus/pyload (pull request #41)
Diffstat (limited to 'module/plugins/hoster/NetloadIn.py')
-rw-r--r-- | module/plugins/hoster/NetloadIn.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index fa2f3ddef..d2bf37d70 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -55,7 +55,7 @@ class NetloadIn(Hoster): __name__ = "NetloadIn" __type__ = "hoster" __pattern__ = r"http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)" - __version__ = "0.40" + __version__ = "0.41" __description__ = """Netload.in Download Hoster""" __author_name__ = ("spoob", "RaNaN", "Gregy") __author_mail__ = ("spoob@pyload.org", "ranan@pyload.org", "gregy@gregy.cz") @@ -66,7 +66,7 @@ class NetloadIn(Hoster): self.multiDL = True self.chunkLimit = -1 self.resumeDownload = True - + def process(self, pyfile): self.url = pyfile.url self.prepare() @@ -94,7 +94,11 @@ class NetloadIn(Hoster): id_regex = re.compile(self.__pattern__) match = id_regex.search(url) - if not match: + if match: + #normalize url + self.url = 'http://www.netload.in/datei%s.htm' % match.group(1) + self.logDebug("URL: %s" % self.url) + else: self.api_data = False return @@ -107,7 +111,7 @@ class NetloadIn(Hoster): self.log.debug("Netload: APIDATA: "+src) self.api_data = {} - if src and src not in ("unknown file_data", "unknown_server_data", "No input file specified."): + if src and ";" in src and src not in ("unknown file_data", "unknown_server_data", "No input file specified."): lines = src.split(";") self.api_data["exists"] = True self.api_data["fileid"] = lines[0] |