diff options
author | 2016-01-02 16:01:56 +0100 | |
---|---|---|
committer | 2016-01-02 16:01:56 +0100 | |
commit | 6c75c0363f496df86e9c744a9a946f86f82715fa (patch) | |
tree | 53e5b7f906e2b9fb1d853d2b0599be7a8c5c7a3d /module/plugins/hoster/UnibytesCom.py | |
parent | Timeout for http request set to 1 minute + report effective url address in he... (diff) | |
download | pyload-6c75c0363f496df86e9c744a9a946f86f82715fa.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module/plugins/hoster/UnibytesCom.py')
-rw-r--r-- | module/plugins/hoster/UnibytesCom.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 63c918da3..c9fe08c1e 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -26,7 +26,7 @@ class UnibytesCom(SimpleHoster): PLUGIN_DOMAIN = "unibytes.com" - INFO_PATTERN = r'<span[^>]*?id="fileName".*?>(?P<N>[^>]+)</span>\s*\((?P<S>\d.*?)\)' + INFO_PATTERN = r'<span[^>]*?id="fileName".*?>(?P<N>.+?)</span>\s*\((?P<S>\d.*?)\)' WAIT_PATTERN = r'Wait for <span id="slowRest">(\d+)</span> sec' LINK_FREE_PATTERN = r'<a href="(.+?)">Download</a>' @@ -42,10 +42,10 @@ class UnibytesCom(SimpleHoster): post=post_data, redirect=False) - m = re.search(r'location:\s*(\S+)', self.req.http.header, re.I) - if m is not None: - self.link = m.group(1) - break + location = self.last_header.get('location') + if location: + self.link = location + return if '>Somebody else is already downloading using your IP-address<' in self.data: self.wait(10 * 60, True) |