summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/BayfilesCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-20 03:02:09 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-20 03:34:54 +0200
commit9395182da7afed55a29bde1c7cbefe4204e783f0 (patch)
tree14c5f5f2dc5ea428c4625e8ce9208c5d77d1fc18 /module/plugins/hoster/BayfilesCom.py
parent[account] self.html -> html (where was possible) (diff)
downloadpyload-9395182da7afed55a29bde1c7cbefe4204e783f0.tar.xz
Store all re.search/match object as "m" instead "found"
Diffstat (limited to 'module/plugins/hoster/BayfilesCom.py')
-rw-r--r--module/plugins/hoster/BayfilesCom.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py
index 449bb890e..272c7cd88 100644
--- a/module/plugins/hoster/BayfilesCom.py
+++ b/module/plugins/hoster/BayfilesCom.py
@@ -40,16 +40,16 @@ class BayfilesCom(SimpleHoster):
PREMIUM_LINK_PATTERN = r'(?:<a class="highlighted-btn" href="|(?=http://s\d+\.baycdn\.com/dl/))(.*?)"'
def handleFree(self):
- found = re.search(self.WAIT_PATTERN, self.html)
- if found:
- self.wait(int(found.group(1)) * 60)
+ m = re.search(self.WAIT_PATTERN, self.html)
+ if m:
+ self.wait(int(m.group(1)) * 60)
self.retry()
# Get download token
- found = re.search(self.VARS_PATTERN, self.html)
- if found is None:
+ m = re.search(self.VARS_PATTERN, self.html)
+ if m is None:
self.parseError('VARS')
- vfid, delay = found.groups()
+ vfid, delay = m.groups()
response = json_loads(self.load('http://bayfiles.com/ajax_download', get={
"_": time() * 1000,
@@ -67,16 +67,16 @@ class BayfilesCom(SimpleHoster):
"vfid": vfid})
# Get final link and download
- found = re.search(self.FREE_LINK_PATTERN, self.html)
- if found is None:
+ m = re.search(self.FREE_LINK_PATTERN, self.html)
+ if m is None:
self.parseError("Free link")
- self.startDownload(found.group(1))
+ self.startDownload(m.group(1))
def handlePremium(self):
- found = re.search(self.PREMIUM_LINK_PATTERN, self.html)
- if found is None:
+ m = re.search(self.PREMIUM_LINK_PATTERN, self.html)
+ if m is None:
self.parseError("Premium link")
- self.startDownload(found.group(1))
+ self.startDownload(m.group(1))
def startDownload(self, url):
self.logDebug("%s URL: %s" % ("Premium" if self.premium else "Free", url))