summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-25 01:11:29 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-25 01:17:03 +0200
commit4da90891eb2544ac15a7d512aba8cb357f68ee5f (patch)
tree84eec3f9f27a880df052da43fb3a6a8112b39c24 /module/plugins/hoster
parentFix and improve plugins logging (diff)
downloadpyload-4da90891eb2544ac15a7d512aba8cb357f68ee5f.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/BezvadataCz.py6
-rw-r--r--module/plugins/hoster/BitshareCom.py3
-rw-r--r--module/plugins/hoster/CrockoCom.py2
-rw-r--r--module/plugins/hoster/CzshareCom.py4
-rw-r--r--module/plugins/hoster/DateiTo.py1
-rw-r--r--module/plugins/hoster/DevhostSt.py1
-rw-r--r--module/plugins/hoster/ExtabitCom.py3
-rw-r--r--module/plugins/hoster/FileSharkPl.py1
-rw-r--r--module/plugins/hoster/FileStoreTo.py1
-rw-r--r--module/plugins/hoster/FilecloudIo.py5
-rw-r--r--module/plugins/hoster/FilefactoryCom.py1
-rw-r--r--module/plugins/hoster/FilerNet.py1
-rw-r--r--module/plugins/hoster/FileserveCom.py4
-rw-r--r--module/plugins/hoster/FlyFilesNet.py1
-rw-r--r--module/plugins/hoster/GigapetaCom.py1
-rw-r--r--module/plugins/hoster/HellshareCz.py3
-rw-r--r--module/plugins/hoster/IfolderRu.py1
-rw-r--r--module/plugins/hoster/JumbofilesCom.py1
-rw-r--r--module/plugins/hoster/Keep2shareCC.py3
-rw-r--r--module/plugins/hoster/KingfilesNet.py2
-rw-r--r--module/plugins/hoster/LetitbitNet.py22
-rw-r--r--module/plugins/hoster/LoadTo.py1
-rw-r--r--module/plugins/hoster/LuckyShareNet.py1
-rw-r--r--module/plugins/hoster/MediafireCom.py3
-rw-r--r--module/plugins/hoster/NarodRu.py1
-rw-r--r--module/plugins/hoster/NetloadIn.py2
-rw-r--r--module/plugins/hoster/NosuploadCom.py2
-rw-r--r--module/plugins/hoster/NowDownloadEu.py2
-rw-r--r--module/plugins/hoster/RemixshareCom.py1
-rw-r--r--module/plugins/hoster/RyushareCom.py1
-rw-r--r--module/plugins/hoster/SendspaceCom.py1
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py3
-rw-r--r--module/plugins/hoster/ShareplaceCom.py2
-rw-r--r--module/plugins/hoster/TurbobitNet.py4
-rw-r--r--module/plugins/hoster/TwoSharedCom.py3
-rw-r--r--module/plugins/hoster/UlozTo.py2
-rw-r--r--module/plugins/hoster/UnibytesCom.py1
-rw-r--r--module/plugins/hoster/UploadedTo.py1
-rw-r--r--module/plugins/hoster/UploadheroCom.py1
-rw-r--r--module/plugins/hoster/UpstoreNet.py9
-rw-r--r--module/plugins/hoster/VeehdCom.py4
-rw-r--r--module/plugins/hoster/VeohCom.py1
-rw-r--r--module/plugins/hoster/WrzucTo.py1
-rw-r--r--module/plugins/hoster/XHamsterCom.py8
-rw-r--r--module/plugins/hoster/YourfilesTo.py2
-rw-r--r--module/plugins/hoster/ZippyshareCom.py1
46 files changed, 38 insertions, 87 deletions
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py
index 9da1861ce..426b4f494 100644
--- a/module/plugins/hoster/BezvadataCz.py
+++ b/module/plugins/hoster/BezvadataCz.py
@@ -30,7 +30,7 @@ class BezvadataCz(SimpleHoster):
#download button
m = re.search(r'<a class="stahnoutSoubor".*?href="(.*?)"', self.html)
if m is None:
- self.error("page1 URL")
+ self.error("Page 1 URL")
url = "http://bezvadata.cz%s" % m.group(1)
#captcha form
@@ -43,7 +43,7 @@ class BezvadataCz(SimpleHoster):
m = re.search(r'<img src="data:image/png;base64,(.*?)"', self.html)
if m is None:
- self.error("captcha img")
+ self.error("Wrong captcha image")
#captcha image is contained in html page as base64encoded data but decryptCaptcha() expects image url
self.load, proper_load = self.loadcaptcha, self.load
@@ -65,7 +65,7 @@ class BezvadataCz(SimpleHoster):
self.checkErrors()
m = re.search(r'<a class="stahnoutSoubor2" href="(.*?)">', self.html)
if m is None:
- self.error("page2 URL")
+ self.error("Page 2 URL")
url = "http://bezvadata.cz%s" % m.group(1)
self.logDebug("DL URL %s" % url)
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py
index fe2ff0be6..a7edf60f3 100644
--- a/module/plugins/hoster/BitshareCom.py
+++ b/module/plugins/hoster/BitshareCom.py
@@ -72,7 +72,6 @@ class BitshareCom(SimpleHoster):
# This may either download our file or forward us to an error page
url = self.getDownloadUrl()
- self.logDebug("Downloading file with url [%s]" % url)
self.download(url)
check = self.checkDownload({"404": ">404 Not Found<", "Error": ">Error occured<"})
@@ -149,7 +148,7 @@ class BitshareCom(SimpleHoster):
return True
elif "ERROR:SESSION ERROR" in response:
self.retry()
- self.logDebug("Wrong captcha")
+
self.invalidCaptcha()
diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py
index 00b102258..8fac72ef2 100644
--- a/module/plugins/hoster/CrockoCom.py
+++ b/module/plugins/hoster/CrockoCom.py
@@ -43,7 +43,7 @@ class CrockoCom(SimpleHoster):
else:
break
- m = re.search(self.FORM_PATTERN, self.html, re.DOTALL)
+ m = re.search(self.FORM_PATTERN, self.html, re.S)
if m is None:
self.error('ACTION')
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index 2b8278a7e..be1c3ab97 100644
--- a/module/plugins/hoster/CzshareCom.py
+++ b/module/plugins/hoster/CzshareCom.py
@@ -66,7 +66,7 @@ class CzshareCom(SimpleHoster):
def handlePremium(self):
# parse download link
try:
- form = re.search(self.PREMIUM_FORM_PATTERN, self.html, re.DOTALL).group(1)
+ form = re.search(self.PREMIUM_FORM_PATTERN, self.html, re.S).group(1)
inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form))
except Exception, e:
self.logError("Parse error (FORM): %s" % e)
@@ -91,7 +91,7 @@ class CzshareCom(SimpleHoster):
self.longWait(5 * 60, 12)
try:
- form = re.search(self.FREE_FORM_PATTERN, self.html, re.DOTALL).group(1)
+ form = re.search(self.FREE_FORM_PATTERN, self.html, re.S).group(1)
inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form))
self.pyfile.size = int(inputs['size'])
except Exception, e:
diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py
index 07033a203..1a2e78ef3 100644
--- a/module/plugins/hoster/DateiTo.py
+++ b/module/plugins/hoster/DateiTo.py
@@ -56,7 +56,6 @@ class DateiTo(SimpleHoster):
self.fail('Too bad...')
download_url = self.html
- self.logDebug("Download URL", download_url)
self.download(download_url)
diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py
index 643538e4d..fce9e6387 100644
--- a/module/plugins/hoster/DevhostSt.py
+++ b/module/plugins/hoster/DevhostSt.py
@@ -38,7 +38,6 @@ class DevhostSt(SimpleHoster):
self.error("Download link not found")
dl_url = m.group(1)
- self.logDebug("Download URL = " + dl_url)
self.download(dl_url, disposition=True)
check = self.checkDownload({'html': re.compile("html")})
diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py
index 489b2453e..15f8b5d1c 100644
--- a/module/plugins/hoster/ExtabitCom.py
+++ b/module/plugins/hoster/ExtabitCom.py
@@ -67,11 +67,12 @@ class ExtabitCom(SimpleHoster):
self.error('JSON')
self.html = self.load("http://extabit.com/file/%s%s" % (fileID, response['href']))
+
m = re.search(self.LINK_PATTERN, self.html)
if m is None:
self.error('Download URL')
+
url = m.group(1)
- self.logDebug("Download URL: " + url)
self.download(url)
diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py
index 20f0e1cc0..427ae9dcc 100644
--- a/module/plugins/hoster/FileSharkPl.py
+++ b/module/plugins/hoster/FileSharkPl.py
@@ -121,7 +121,6 @@ class FileSharkPl(SimpleHoster):
if check == "DL-found":
self.correctCaptcha()
- self.logDebug("Captcha solved correct")
elif check == "wrong_captcha":
self.invalidCaptcha()
diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py
index b8e56271b..28dc4a8fa 100644
--- a/module/plugins/hoster/FileStoreTo.py
+++ b/module/plugins/hoster/FileStoreTo.py
@@ -30,7 +30,6 @@ class FileStoreTo(SimpleHoster):
self.wait(10)
ldc = re.search(r'wert="(\w+)"', self.html).group(1)
link = self.load("http://filestore.to/ajax/download.php", get={"LDC": ldc})
- self.logDebug("Download link = " + link)
self.download(link)
diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py
index 659a2cc0f..74652be04 100644
--- a/module/plugins/hoster/FilecloudIo.py
+++ b/module/plugins/hoster/FilecloudIo.py
@@ -93,14 +93,15 @@ class FilecloudIo(SimpleHoster):
if response['dl']:
self.html = self.load('http://filecloud.io/download.html')
+
m = re.search(self.LINK_PATTERN % self.file_info['ID'], self.html)
if m is None:
self.error("Download URL")
- download_url = m.group(1)
- self.logDebug("Download URL: %s" % download_url)
if "size" in self.file_info and self.file_info['size']:
self.check_data = {"size": int(self.file_info['size'])}
+
+ download_url = m.group(1)
self.download(download_url)
else:
self.fail("Unexpected server response")
diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py
index dcb2fd8f0..f4729cf2f 100644
--- a/module/plugins/hoster/FilefactoryCom.py
+++ b/module/plugins/hoster/FilefactoryCom.py
@@ -81,7 +81,6 @@ class FilefactoryCom(SimpleHoster):
elif 'content-disposition' in header:
url = self.pyfile.url
else:
- self.logInfo('You could enable "Direct Downloads" on http://filefactory.com/account/')
html = self.load(self.pyfile.url)
m = re.search(self.LINK_PATTERN, html)
if m:
diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py
index e02f5a37c..9bb00ba92 100644
--- a/module/plugins/hoster/FilerNet.py
+++ b/module/plugins/hoster/FilerNet.py
@@ -73,7 +73,6 @@ class FilerNet(SimpleHoster):
self.correctCaptcha()
break
else:
- self.logInfo("Wrong captcha")
self.invalidCaptcha()
if not downloadURL:
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 0f8372cf7..b3f197736 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -15,7 +15,7 @@ def checkFile(plugin, urls):
html = getURL(plugin.URLS[1], post={"urls": "\n".join(urls)}, decode=True)
file_info = []
- for li in re.finditer(plugin.LINKCHECK_TR, html, re.DOTALL):
+ for li in re.finditer(plugin.LINKCHECK_TR, html, re.S):
try:
cols = re.findall(plugin.LINKCHECK_TD, li.group(1))
if cols:
@@ -160,12 +160,10 @@ class FileserveCom(Hoster):
for _ in xrange(5):
challenge, code = recaptcha.challenge(captcha_key)
-
response = json_loads(self.load(self.URLS[2],
post={'recaptcha_challenge_field': challenge,
'recaptcha_response_field': code,
'recaptcha_shortencode_field': self.file_id}))
- self.logDebug("reCaptcha response : %s" % response)
if not response['success']:
self.invalidCaptcha()
else:
diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py
index 6aa5ecf28..8c5c95839 100644
--- a/module/plugins/hoster/FlyFilesNet.py
+++ b/module/plugins/hoster/FlyFilesNet.py
@@ -42,5 +42,4 @@ class FlyFilesNet(SimpleHoster):
download_url = parsed_url.replace('#downlink|', '')
- self.logDebug("Download URL: %s" % download_url)
self.download(download_url)
diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py
index 65d940c5a..b606322cf 100644
--- a/module/plugins/hoster/GigapetaCom.py
+++ b/module/plugins/hoster/GigapetaCom.py
@@ -52,7 +52,6 @@ class GigapetaCom(SimpleHoster):
self.fail("No valid captcha code entered")
self.req.http.c.setopt(FOLLOWLOCATION, 1)
- self.logDebug("Download URL: %s" % download_url)
self.download(download_url)
diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py
index 7a8579e78..8809da5ef 100644
--- a/module/plugins/hoster/HellshareCz.py
+++ b/module/plugins/hoster/HellshareCz.py
@@ -40,9 +40,8 @@ class HellshareCz(SimpleHoster):
m = re.search(self.SHOW_WINDOW_PATTERN, self.html)
if m is None:
self.error('SHOW WINDOW')
- self.url = "http://www.hellshare.com" + m.group(1)
- self.logDebug("DOWNLOAD URL: " + self.url)
+ self.url = "http://www.hellshare.com" + m.group(1)
self.download(self.url)
diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py
index 176225e30..93b8948de 100644
--- a/module/plugins/hoster/IfolderRu.py
+++ b/module/plugins/hoster/IfolderRu.py
@@ -70,7 +70,6 @@ class IfolderRu(SimpleHoster):
download_url = re.search(self.LINK_PATTERN, self.html).group(1)
self.correctCaptcha()
- self.logDebug("Download URL: %s" % download_url)
self.download(download_url)
diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py
index f43ee7697..40f234673 100644
--- a/module/plugins/hoster/JumbofilesCom.py
+++ b/module/plugins/hoster/JumbofilesCom.py
@@ -31,7 +31,6 @@ class JumbofilesCom(SimpleHoster):
post_data = {"id": ukey, "op": "download3", "rand": ""}
html = self.load(self.pyfile.url, post=post_data, decode=True)
url = re.search(self.LINK_PATTERN, html).group(1)
- self.logDebug("Download " + url)
self.download(url)
diff --git a/module/plugins/hoster/Keep2shareCC.py b/module/plugins/hoster/Keep2shareCC.py
index a56ac36da..d6258bb06 100644
--- a/module/plugins/hoster/Keep2shareCC.py
+++ b/module/plugins/hoster/Keep2shareCC.py
@@ -38,7 +38,7 @@ class Keep2shareCC(SimpleHoster):
self.fid = re.search(r'<input type="hidden" name="slow_id" value="([^"]+)">', self.html).group(1)
self.html = self.load(self.pyfile.url, post={'yt0': '', 'slow_id': self.fid})
- m = re.search(r"function download\(\){.*window\.location\.href = '([^']+)';", self.html, re.DOTALL)
+ m = re.search(r"function download\(\){.*window\.location\.href = '([^']+)';", self.html, re.S)
if m: # Direct mode
self.startDownload(m.group(1))
else:
@@ -94,7 +94,6 @@ class Keep2shareCC(SimpleHoster):
self.correctCaptcha()
break
else:
- self.logInfo("Wrong captcha")
self.invalidCaptcha()
else:
self.fail("All captcha attempts failed")
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index 223241f5a..b4e393c37 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -53,7 +53,7 @@ class KingfilesNet(SimpleHoster):
self.error("Random key not found")
rand = m.group(1)
- self.logDebug("rand", rand)
+ self.logDebug("rand = ", rand)
post_data = {'op': "download2",
'id': file_id,
diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py
index 9357cc758..983a50c6c 100644
--- a/module/plugins/hoster/LetitbitNet.py
+++ b/module/plugins/hoster/LetitbitNet.py
@@ -71,7 +71,7 @@ class LetitbitNet(SimpleHoster):
def handleFree(self):
action, inputs = self.parseHtmlForm('id="ifree_form"')
if not action:
- self.error("page 1 / ifree_form")
+ self.error("ifree_form")
domain = "http://www." + self.HOSTER_NAME
self.pyfile.size = float(inputs['sssize'])
@@ -80,22 +80,6 @@ class LetitbitNet(SimpleHoster):
self.html = self.load(domain + action, post=inputs, cookies=True)
- # action, inputs = self.parseHtmlForm('id="d3_form"')
- # if not action:
- # self.error("page 2 / d3_form")
- # self.logDebug(action, inputs)
- #
- # self.html = self.load(action, post = inputs, cookies = True)
- #
- # try:
- # ajax_check_url, captcha_url = re.search(self.CHECK_URL_PATTERN, self.html).groups()
- # m = re.search(self.SECONDS_PATTERN, self.html)
- # seconds = int(m.group(1)) if m else 60
- # self.wait(seconds+1)
- # except Exception, e:
- # self.logError(e)
- # self.error("page 3 / js")
-
m = re.search(self.SECONDS_PATTERN, self.html)
seconds = int(m.group(1)) if m else 60
self.logDebug("Seconds found", seconds)
@@ -106,7 +90,7 @@ class LetitbitNet(SimpleHoster):
response = self.load("%s/ajax/download3.php" % domain, post=" ", cookies=True)
if response != '1':
- self.error('Unknown response - ajax_check_url')
+ self.error("Unknown response - ajax_check_url")
self.logDebug(response)
recaptcha = ReCaptcha(self)
@@ -123,7 +107,6 @@ class LetitbitNet(SimpleHoster):
self.logWarning("Daily limit reached")
self.wait(secondsToMidnight(gmt=2), True)
if response == "error_wrong_captcha":
- self.logError("Wrong Captcha")
self.invalidCaptcha()
self.retry()
elif response.startswith('['):
@@ -137,7 +120,6 @@ class LetitbitNet(SimpleHoster):
for download_url in urls:
try:
- self.logDebug("Download URL", download_url)
self.download(download_url)
break
except Exception, e:
diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py
index a28428b73..53227baf1 100644
--- a/module/plugins/hoster/LoadTo.py
+++ b/module/plugins/hoster/LoadTo.py
@@ -62,7 +62,6 @@ class LoadTo(SimpleHoster):
self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response})
check = self.checkDownload({'404': re.compile("\A<h1>404 Not Found</h1>"), 'html': re.compile("html")})
if check == "404":
- self.logWarning("The captcha you entered was incorrect. Please try again.")
self.invalidCaptcha()
self.retry()
elif check == "html":
diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py
index 5e1b6bf60..e76105944 100644
--- a/module/plugins/hoster/LuckyShareNet.py
+++ b/module/plugins/hoster/LuckyShareNet.py
@@ -62,7 +62,6 @@ class LuckyShareNet(SimpleHoster):
self.correctCaptcha()
break
elif 'Verification failed' in rep:
- self.logInfo("Wrong captcha")
self.invalidCaptcha()
else:
self.error('Unable to get downlaod link')
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index 20ca6753d..9f30b5761 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -108,9 +108,8 @@ class MediafireCom(SimpleHoster):
m = re.search(r'kNO = r"(http://.*?)";', self.html)
if m is None:
self.error("Download URL")
- download_url = m.group(1)
- self.logDebug("DOWNLOAD LINK:", download_url)
+ download_url = m.group(1)
self.download(download_url)
diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py
index f70ff9622..0a99526f4 100644
--- a/module/plugins/hoster/NarodRu.py
+++ b/module/plugins/hoster/NarodRu.py
@@ -54,7 +54,6 @@ class NarodRu(SimpleHoster):
else:
self.fail("No valid captcha code entered")
- self.logDebug("Download link: " + url)
self.download(url)
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 800de3068..ffacc9c66 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -161,7 +161,7 @@ class NetloadIn(Hoster):
if "* The file was deleted" in page:
self.offline()
- name = re.search(r'class="dl_first_filename">([^<]+)', page, re.MULTILINE)
+ name = re.search(r'class="dl_first_filename">([^<]+)', page, re.M)
# the found filename is not truncated
if name:
name = name.group(1).strip()
diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py
index 19d851b0a..7416f82bc 100644
--- a/module/plugins/hoster/NosuploadCom.py
+++ b/module/plugins/hoster/NosuploadCom.py
@@ -31,7 +31,7 @@ class NosuploadCom(XFSPHoster):
# stage2: wait some time and press the "Download File" button
data = self.getPostParameters()
- wait_time = re.search(self.WAIT_PATTERN, self.html, re.MULTILINE | re.DOTALL).group(1)
+ wait_time = re.search(self.WAIT_PATTERN, self.html, re.M | re.S).group(1)
self.logDebug("Hoster told us to wait %s seconds" % wait_time)
self.wait(wait_time)
self.html = self.load(self.pyfile.url, post=data, ref=True, decode=True)
diff --git a/module/plugins/hoster/NowDownloadEu.py b/module/plugins/hoster/NowDownloadEu.py
index 256b2c801..59ca68258 100644
--- a/module/plugins/hoster/NowDownloadEu.py
+++ b/module/plugins/hoster/NowDownloadEu.py
@@ -56,7 +56,7 @@ class NowDownloadEu(SimpleHoster):
url = re.search(self.LINK_PATTERN, self.html)
if url is None:
self.error("Download link not found")
- self.logDebug("Download link", url.group(1))
+
self.download(str(url.group(1)))
diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py
index 94be78b4f..38c55afc3 100644
--- a/module/plugins/hoster/RemixshareCom.py
+++ b/module/plugins/hoster/RemixshareCom.py
@@ -55,7 +55,6 @@ class RemixshareCom(SimpleHoster):
self.wait(seconds.group(1))
# Finally start downloading...
- self.logDebug("Download URL = r" + dl_url)
self.download(dl_url, disposition=True)
diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py
index 1acc1fd58..510229fe8 100644
--- a/module/plugins/hoster/RyushareCom.py
+++ b/module/plugins/hoster/RyushareCom.py
@@ -68,7 +68,6 @@ class RyushareCom(XFSPHoster):
self.html = self.load(self.pyfile.url, post=inputs)
if "WRONG CAPTCHA" in self.html:
self.invalidCaptcha()
- self.logInfo("Invalid Captcha")
else:
self.correctCaptcha()
break
diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py
index 85fa196a3..f8e720070 100644
--- a/module/plugins/hoster/SendspaceCom.py
+++ b/module/plugins/hoster/SendspaceCom.py
@@ -54,7 +54,6 @@ class SendspaceCom(SimpleHoster):
else:
self.fail("Download link not found")
- self.logDebug("Download URL: %s" % download_url)
self.download(download_url)
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 565e0364a..4d3697a09 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -123,9 +123,8 @@ class ShareonlineBiz(Hoster):
self.fail("No valid captcha solution received")
download_url = response.decode("base64")
- self.logDebug(download_url)
if not download_url.startswith("http://"):
- self.error("download url")
+ self.error("Wrong download url")
self.wait()
self.download(download_url)
diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py
index bef14de0f..7f2a95dfe 100644
--- a/module/plugins/hoster/ShareplaceCom.py
+++ b/module/plugins/hoster/ShareplaceCom.py
@@ -68,7 +68,7 @@ class ShareplaceCom(Hoster):
self.logDebug("URL: %s" % url)
return url
else:
- self.fail("absolute filepath could not be found. offline? ")
+ self.error("Absolute filepath not found")
def get_file_name(self):
diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py
index d0b441fa2..c1029ff70 100644
--- a/module/plugins/hoster/TurbobitNet.py
+++ b/module/plugins/hoster/TurbobitNet.py
@@ -67,7 +67,7 @@ class TurbobitNet(SimpleHoster):
action, inputs = self.parseHtmlForm("action='#'")
if not inputs:
- self.error("captcha form")
+ self.error("Captcha form not found")
self.logDebug(inputs)
if inputs['captcha_type'] == 'recaptcha':
@@ -84,7 +84,6 @@ class TurbobitNet(SimpleHoster):
self.html = self.load(self.url, post=inputs)
if '<div class="captcha-error">Incorrect, try again!<' in self.html:
- self.logInfo("Invalid captcha")
self.invalidCaptcha()
else:
self.correctCaptcha()
@@ -106,7 +105,6 @@ class TurbobitNet(SimpleHoster):
r'zza=\2;for(var zzi=0;zzi<zza.length;zzi++){\1=zza[zzi];', rtUpdate)
rtUpdate = re.sub(r"for\((\w+)=", r"for(var \1=", rtUpdate)
- self.logDebug("rtUpdate")
self.setStorage("rtUpdate", rtUpdate)
self.setStorage("timestamp", timestamp())
self.setStorage("version", self.__version__)
diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py
index e1cdead9b..ee48556d4 100644
--- a/module/plugins/hoster/TwoSharedCom.py
+++ b/module/plugins/hoster/TwoSharedCom.py
@@ -32,9 +32,8 @@ class TwoSharedCom(SimpleHoster):
m = re.search(self.LINK_PATTERN, self.html)
if m is None:
self.error('Download link')
- link = m.group(1)
- self.logDebug("Download URL %s" % link)
+ link = m.group(1)
self.download(link)
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index 9b70c8efa..7b57a0d02 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -86,7 +86,7 @@ class UlozTo(SimpleHoster):
def handleFree(self):
action, inputs = self.parseHtmlForm('id="frm-downloadDialog-freeDownloadForm"')
if not action or not inputs:
- self.error("free download form")
+ self.error("Free download form not found")
self.logDebug("inputs.keys = " + str(inputs.keys()))
# get and decrypt captcha
diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py
index 8e732d1fd..d2588b95f 100644
--- a/module/plugins/hoster/UnibytesCom.py
+++ b/module/plugins/hoster/UnibytesCom.py
@@ -64,7 +64,6 @@ class UnibytesCom(SimpleHoster):
else:
self.fail("No valid captcha code entered")
- self.logDebug("Download link: " + url)
self.req.http.c.setopt(FOLLOWLOCATION, 1)
self.download(url)
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 055047859..69148efbf 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -226,7 +226,6 @@ class UploadedTo(Hoster):
self.wait()
self.retry()
elif '"err":"captcha"' in result:
- self.logError("captcha is disabled")
self.invalidCaptcha()
elif "type:'download'" in result:
self.correctCaptcha()
diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py
index f2bcaea6a..2ae3cb992 100644
--- a/module/plugins/hoster/UploadheroCom.py
+++ b/module/plugins/hoster/UploadheroCom.py
@@ -62,7 +62,6 @@ class UploadheroCom(SimpleHoster):
def handlePremium(self):
self.logDebug("%s: Use Premium Account" % self.__name__)
link = re.search(self.PREMIUM_URL_PATTERN, self.html).group(1)
- self.logDebug("Downloading link : '%s'" % link)
self.download(link)
diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py
index 2e500dc01..3695f0c6d 100644
--- a/module/plugins/hoster/UpstoreNet.py
+++ b/module/plugins/hoster/UpstoreNet.py
@@ -30,7 +30,7 @@ class UpstoreNet(SimpleHoster):
# STAGE 1: get link to continue
m = re.search(self.CHASH_PATTERN, self.html)
if m is None:
- self.error("could not detect hash")
+ self.error("Unable to detect hash")
chash = m.group(1)
self.logDebug("Read hash " + chash)
# continue to stage2
@@ -45,7 +45,7 @@ class UpstoreNet(SimpleHoster):
for i in xrange(5):
m = re.search(self.WAIT_PATTERN, self.html)
if m is None:
- self.error("could not find wait pattern")
+ self.error("Wait pattern not found")
wait_time = m.group(1)
# then, do the waiting
@@ -59,15 +59,14 @@ class UpstoreNet(SimpleHoster):
self.html = self.load(self.pyfile.url, post=post_data, decode=True)
# STAGE 3: get direct link
- m = re.search(self.LINK_PATTERN, self.html, re.DOTALL)
+ m = re.search(self.LINK_PATTERN, self.html, re.S)
if m:
break
if m is None:
- self.error("could not detect direct link")
+ self.error("Download link not found")
direct = m.group(1)
- self.logDebug("Found direct link: " + direct)
self.download(direct, disposition=True)
diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py
index 47f95ed41..0283674d1 100644
--- a/module/plugins/hoster/VeehdCom.py
+++ b/module/plugins/hoster/VeehdCom.py
@@ -58,7 +58,7 @@ class VeehdCom(Hoster):
m = re.search(r'<title[^>]*>([^<]+) on Veehd</title>', self.html)
if m is None:
- self.fail("video title not found")
+ self.error("Video title not found")
name = m.group(1)
@@ -80,6 +80,6 @@ class VeehdCom(Hoster):
m = re.search(r'<embed type="video/divx" src="(http://([^/]*\.)?veehd\.com/dl/[^"]+)"',
self.html)
if m is None:
- self.fail("embedded video url not found")
+ self.error("Embedded video url not found")
return m.group(1)
diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py
index f35ed2510..8863750e0 100644
--- a/module/plugins/hoster/VeohCom.py
+++ b/module/plugins/hoster/VeohCom.py
@@ -41,7 +41,6 @@ class VeohCom(SimpleHoster):
if m:
self.pyfile.name += ".mp4"
link = m.group(1).replace("\\", "")
- self.logDebug("Download link: " + link)
self.download(link)
return
else:
diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py
index 896da1c1b..b3b917018 100644
--- a/module/plugins/hoster/WrzucTo.py
+++ b/module/plugins/hoster/WrzucTo.py
@@ -46,7 +46,6 @@ class WrzucTo(SimpleHoster):
self.error('Download URL')
download_url = "http://%s.wrzuc.to/pobierz/%s" % (data['server_id'], data['download_link'])
- self.logDebug("Download URL: %s" % download_url)
self.download(download_url)
diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py
index 7257b2988..9b97b5e94 100644
--- a/module/plugins/hoster/XHamsterCom.py
+++ b/module/plugins/hoster/XHamsterCom.py
@@ -53,7 +53,7 @@ class XHamsterCom(Hoster):
if not self.html:
self.download_html()
- flashvar_pattern = re.compile('flashvars = ({.*?});', re.DOTALL)
+ flashvar_pattern = re.compile('flashvars = ({.*?});', re.S)
json_flashvar = flashvar_pattern.search(self.html)
if not json_flashvar:
@@ -80,7 +80,7 @@ class XHamsterCom(Hoster):
self.fail("Parse error (file_url)")
file_url = file_url.group(1)
long_url = srv_url + file_url
- self.logDebug("long_url: %s" % long_url)
+ self.logDebug("long_url = " + long_url)
else:
if flashvars['file']:
file_url = unquote(flashvars['file'])
@@ -89,10 +89,10 @@ class XHamsterCom(Hoster):
if url_mode == '3':
long_url = file_url
- self.logDebug("long_url: %s" % long_url)
+ self.logDebug("long_url = " + long_url)
else:
long_url = srv_url + "key=" + file_url
- self.logDebug("long_url: %s" % long_url)
+ self.logDebug("long_url = " + long_url)
return long_url
diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py
index 9de5929ff..38cae4deb 100644
--- a/module/plugins/hoster/YourfilesTo.py
+++ b/module/plugins/hoster/YourfilesTo.py
@@ -66,7 +66,7 @@ class YourfilesTo(Hoster):
url = unquote(url.replace("http://http:/http://", "http://").replace("dumdidum", ""))
return url
else:
- self.fail("absolute filepath could not be found. offline? ")
+ self.error("Absolute filepath not found")
def get_file_name(self):
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 3cc52744f..b73113040 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -36,7 +36,6 @@ class ZippyshareCom(SimpleHoster):
def handleFree(self):
url = self.get_link()
- self.logDebug("Download URL: %s" % url)
self.download(url)