From 6c75c0363f496df86e9c744a9a946f86f82715fa Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 2 Jan 2016 16:01:56 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/UnibytesCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/UnibytesCom.py') 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']*?id="fileName".*?>(?P[^>]+)\s*\((?P\d.*?)\)' + INFO_PATTERN = r']*?id="fileName".*?>(?P.+?)\s*\((?P\d.*?)\)' WAIT_PATTERN = r'Wait for (\d+) sec' LINK_FREE_PATTERN = r'Download' @@ -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) -- cgit v1.2.3