summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/SoundcloudCom.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/SoundcloudCom.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/SoundcloudCom.py')
-rw-r--r--module/plugins/hoster/SoundcloudCom.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py
index f4a81059b..75a1cffeb 100644
--- a/module/plugins/hoster/SoundcloudCom.py
+++ b/module/plugins/hoster/SoundcloudCom.py
@@ -19,24 +19,24 @@ class SoundcloudCom(Hoster):
# default UserAgent of HTTPRequest fails for this hoster so we use this one
self.req.http.c.setopt(pycurl.USERAGENT, 'Mozilla/5.0')
page = self.load(pyfile.url)
- found = re.search(r'<div class="haudio.*?large.*?" data-sc-track="(?P<ID>[0-9]*)"', page)
+ m = re.search(r'<div class="haudio.*?large.*?" data-sc-track="(?P<ID>[0-9]*)"', page)
songId = clientId = ""
- if found:
- songId = found.group("ID")
+ if m:
+ songId = m.group("ID")
if len(songId) <= 0:
self.logError("Could not find song id")
self.offline()
else:
- found = re.search(r'"clientID":"(?P<CID>.*?)"', page)
- if found:
- clientId = found.group("CID")
+ m = re.search(r'"clientID":"(?P<CID>.*?)"', page)
+ if m:
+ clientId = m.group("CID")
if len(clientId) <= 0:
clientId = "b45b1aa10f1ac2941910a7f0d10f8e28"
- found = re.search(r'<em itemprop="name">\s(?P<TITLE>.*?)\s</em>', page)
- if found:
- pyfile.name = found.group("TITLE") + ".mp3"
+ m = re.search(r'<em itemprop="name">\s(?P<TITLE>.*?)\s</em>', page)
+ if m:
+ pyfile.name = m.group("TITLE") + ".mp3"
else:
pyfile.name = re.match(self.__pattern__, pyfile.url).group("SID") + ".mp3"