summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-17 11:23:08 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-24 22:42:18 +0200
commitd99d6eddb6af637580bb6fc72013f913077525d6 (patch)
tree3a2be1b471d34ae293ec96f2110e9fc452a6e638 /module/plugins/hoster
parent[Hoster] Import fixup (diff)
downloadpyload-d99d6eddb6af637580bb6fc72013f913077525d6.tar.xz
Spare fixes
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/EuroshareEu.py17
-rw-r--r--module/plugins/hoster/HighWayMe.py2
-rw-r--r--module/plugins/hoster/OverLoadMe.py4
-rw-r--r--module/plugins/hoster/YourfilesTo.py3
4 files changed, 9 insertions, 17 deletions
diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py
index c4bd54667..deb138ec7 100644
--- a/module/plugins/hoster/EuroshareEu.py
+++ b/module/plugins/hoster/EuroshareEu.py
@@ -23,20 +23,20 @@ class EuroshareEu(SimpleHoster):
LINK_FREE_PATTERN = r'<a href="(/file/\d+/[^/]*/download/)"><div class="downloadButton"'
- ERR_PARDL_PATTERN = r'<h2>Prebieha s.ahovanie</h2>|<p>Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor'
- ERR_NOT_LOGGED_IN_PATTERN = r'href="/customer-zone/login/"'
+ DL_LIMIT_PATTERN = r'<h2>Prebieha s.ahovanie</h2>|<p>Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor'
+ ERROR_PATTERN = r'href="/customer-zone/login/"'
URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")]
def handlePremium(self, pyfile):
- if self.ERR_NOT_LOGGED_IN_PATTERN in self.html:
+ if self.ERROR_PATTERN in self.html:
self.account.relogin(self.user)
self.retry(reason=_("User not logged in"))
self.link = pyfile.url.rstrip('/') + "/download/"
- check = self.checkDownload({"login": re.compile(self.ERR_NOT_LOGGED_IN_PATTERN),
+ check = self.checkDownload({"login": re.compile(self.ERROR_PATTERN),
"json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')})
if check == "login" or (check == "json" and self.lastCheck.group(1) == "Access token expired"):
@@ -48,7 +48,7 @@ class EuroshareEu(SimpleHoster):
def handleFree(self, pyfile):
- if re.search(self.ERR_PARDL_PATTERN, self.html):
+ if re.search(self.DL_LIMIT_PATTERN, self.html):
self.wait(5 * 60, 12, _("Download limit reached"))
m = re.search(self.LINK_FREE_PATTERN, self.html)
@@ -58,11 +58,4 @@ class EuroshareEu(SimpleHoster):
self.link = "http://euroshare.eu%s" % m.group(1)
- def checkFile(self):
- if self.checkDownload({"multi-dl": re.compile(self.ERR_PARDL_PATTERN)})
- self.wait(5 * 60, 12, _("Download limit reached"))
-
- return super(EuroshareEu, self).checkFile()
-
-
getInfo = create_getInfo(EuroshareEu)
diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py
index 9f39c21e8..dc7a9fc12 100644
--- a/module/plugins/hoster/HighWayMe.py
+++ b/module/plugins/hoster/HighWayMe.py
@@ -24,7 +24,7 @@ class HighWayMe(MultiHoster):
def checkErrors(self):
- if self.html.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then ... But I don't now how to implement it.
+ if self.html.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it.
self.account.relogin(self.user)
self.retry()
diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py
index bc3ca87c4..8ba310b52 100644
--- a/module/plugins/hoster/OverLoadMe.py
+++ b/module/plugins/hoster/OverLoadMe.py
@@ -40,12 +40,10 @@ class OverLoadMe(MultiHoster):
self.logWarning(data['msg'])
self.tempOffline()
else:
+ self.link = data['downloadlink']
if pyfile.name and pyfile.name.endswith('.tmp') and data['filename']:
pyfile.name = data['filename']
pyfile.size = parseFileSize(data['filesize'])
- http_repl = ["http://", "https://"]
- self.link = data['downloadlink'].replace(*http_repl if self.getConfig('ssl') else *http_repl[::-1])
-
getInfo = create_getInfo(OverLoadMe)
diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py
index 0f6ca49df..4d316eabf 100644
--- a/module/plugins/hoster/YourfilesTo.py
+++ b/module/plugins/hoster/YourfilesTo.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
-import reimport urllib
+import re
+import urllib
from module.plugins.internal.Hoster import Hoster