diff options
Diffstat (limited to 'pyload/plugins/hoster')
25 files changed, 96 insertions, 127 deletions
diff --git a/pyload/plugins/hoster/ARD.py b/pyload/plugins/hoster/ARD.py index 5ab65cd4b..cda783091 100644 --- a/pyload/plugins/hoster/ARD.py +++ b/pyload/plugins/hoster/ARD.py @@ -39,7 +39,7 @@ class RTMP: class ARD(Hoster): __name__ = "ARD Mediathek" - __version__ = "0.1" + __version__ = "0.11" __pattern__ = r"http://www\.ardmediathek\.de/.*" __config__ = [] @@ -73,7 +73,7 @@ class ARD(Hoster): chown(location, uid, gid) except Exception, e: - self.log.warning(_("Setting User and Group failed: %s") % str(e)) + self.logWarning(_("Setting User and Group failed: %s") % str(e)) output_file = save_join(location, save_path(pyfile.name)) + os.path.splitext(playpath)[1] diff --git a/pyload/plugins/hoster/AlldebridCom.py b/pyload/plugins/hoster/AlldebridCom.py index e5223b011..cdb5ccc08 100644 --- a/pyload/plugins/hoster/AlldebridCom.py +++ b/pyload/plugins/hoster/AlldebridCom.py @@ -10,7 +10,7 @@ from module.utils import parseFileSize class AlldebridCom(Hoster): __name__ = "AlldebridCom" - __version__ = "0.31" + __version__ = "0.33" __type__ = "hoster" __pattern__ = r"https?://.*alldebrid\..*" @@ -34,10 +34,10 @@ class AlldebridCom(Hoster): def process(self, pyfile): if not self.account: - self.logError("Please enter your AllDebrid account or deactivate this plugin") + self.logError(_("Please enter your %s account or deactivate this plugin") % "AllDebrid") self.fail("No AllDebrid account provided") - self.log.debug("AllDebrid: Old URL: %s" % pyfile.url) + self.logDebug("AllDebrid: Old URL: %s" % pyfile.url) if re.match(self.__pattern__, pyfile.url): new_url = pyfile.url else: diff --git a/pyload/plugins/hoster/BitshareCom.py b/pyload/plugins/hoster/BitshareCom.py index 8b81c28cd..5e117ff45 100644 --- a/pyload/plugins/hoster/BitshareCom.py +++ b/pyload/plugins/hoster/BitshareCom.py @@ -2,58 +2,24 @@ from __future__ import with_statement import re -from pycurl import FOLLOWLOCATION -from module.plugins.Hoster import Hoster +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.plugins.internal.CaptchaService import ReCaptcha -from module.network.RequestFactory import getRequest -def getInfo(urls): - result = [] - - for url in urls: - - # Get file info html - req = getRequest() - req.cj.setCookie(BitshareCom.HOSTER_DOMAIN, "language_selection", "EN") - html = req.load(url) - req.close() - - # Check online - if re.search(BitshareCom.FILE_OFFLINE_PATTERN, html): - result.append((url, 0, 1, url)) - continue - - # Name - name1 = re.search(BitshareCom.__pattern__, url).group('name') - m = re.search(BitshareCom.FILE_INFO_PATTERN, html) - name2 = m.group('name') - name = max(name1, name2) - - # Size - value = float(m.group('size')) - units = m.group('units') - pow = {'KB' : 1, 'MB' : 2, 'GB' : 3}[units] - size = int(value*1024**pow) - - # Return info - result.append((name, size, 2, url)) - - yield result - -class BitshareCom(Hoster): +class BitshareCom(SimpleHoster): __name__ = "BitshareCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?bitshare\.com/(files/(?P<id1>[a-zA-Z0-9]+)(/(?P<name>.*?)\.html)?|\?f=(?P<id2>[a-zA-Z0-9]+))" - __version__ = "0.47" + __version__ = "0.48" __description__ = """Bitshare.Com File Download Hoster""" __author_name__ = ("paulking", "fragonib") __author_mail__ = (None, "fragonib[AT]yahoo[DOT]es") HOSTER_DOMAIN = "bitshare.com" FILE_OFFLINE_PATTERN = r'''(>We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)''' - FILE_INFO_PATTERN = r'<h1>(Downloading|Streaming)\s(?P<name>.+?)\s-\s(?P<size>[\d.]+)\s(?P<units>..)yte</h1>' + FILE_NAME_PATTERN = r'Download:</td>\s*<td><input type="text" value="http://bitshare\.com/files/\w+/(?P<N>[^"]+)\.html"' + FILE_SIZE_PATTERN = r'- (?P<S>[\d.]+) (?P<U>\w+)</h1>' FILE_AJAXID_PATTERN = r'var ajaxdl = "(.*?)";' CAPTCHA_KEY_PATTERN = r"http://api\.recaptcha\.net/challenge\?k=(.*?) " TRAFFIC_USED_UP = r"Your Traffic is used up for today. Upgrade to premium to continue!" @@ -177,3 +143,5 @@ class BitshareCom(Hoster): self.retry() self.logDebug("Wrong captcha") self.invalidCaptcha() + +getInfo = create_getInfo(BitshareCom) diff --git a/pyload/plugins/hoster/DebridItaliaCom.py b/pyload/plugins/hoster/DebridItaliaCom.py index 470c4ae5d..1c2f4246b 100644 --- a/pyload/plugins/hoster/DebridItaliaCom.py +++ b/pyload/plugins/hoster/DebridItaliaCom.py @@ -22,7 +22,7 @@ from module.plugins.Hoster import Hoster class DebridItaliaCom(Hoster): __name__ = "DebridItaliaCom" - __version__ = "0.03" + __version__ = "0.04" __type__ = "hoster" __pattern__ = r"https?://.*debriditalia\.com" __description__ = """Debriditalia.com hoster plugin""" @@ -35,7 +35,7 @@ class DebridItaliaCom(Hoster): def process(self, pyfile): if not self.account: - self.logError("Please enter your DebridItalia account or deactivate this plugin") + self.logError(_("Please enter your %s account or deactivate this plugin") % "DebridItalia") self.fail("No DebridItalia account provided") self.logDebug("Old URL: %s" % pyfile.url) diff --git a/pyload/plugins/hoster/DepositfilesCom.py b/pyload/plugins/hoster/DepositfilesCom.py index 850812c5d..ee5fdf6af 100644 --- a/pyload/plugins/hoster/DepositfilesCom.py +++ b/pyload/plugins/hoster/DepositfilesCom.py @@ -11,7 +11,7 @@ class DepositfilesCom(SimpleHoster): __name__ = "DepositfilesCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?(depositfiles\.com|dfiles\.eu)(/\w{1,3})?/files/[\w]+" - __version__ = "0.43" + __version__ = "0.44" __description__ = """Depositfiles.com Download Hoster""" __author_name__ = ("spoob", "zoidberg") __author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz") @@ -35,7 +35,7 @@ class DepositfilesCom(SimpleHoster): if re.search(self.FILE_OFFLINE_PATTERN, self.html): self.offline() if re.search(r'File is checked, please try again in a minute.', self.html) is not None: - self.log.info("DepositFiles.com: The file is being checked. Waiting 1 minute.") + self.logInfo("DepositFiles.com: The file is being checked. Waiting 1 minute.") self.setWait(61) self.wait() self.retry() @@ -43,7 +43,7 @@ class DepositfilesCom(SimpleHoster): wait = re.search(r'html_download_api-limit_interval\">(\d+)</span>', self.html) if wait: wait_time = int(wait.group(1)) - self.log.info( "%s: Traffic used up. Waiting %d seconds." % (self.__name__, wait_time) ) + self.logInfo( "%s: Traffic used up. Waiting %d seconds." % (self.__name__, wait_time) ) self.setWait(wait_time) self.wantReconnect = True self.wait() @@ -52,7 +52,7 @@ class DepositfilesCom(SimpleHoster): wait = re.search(r'>Try in (\d+) minutes or use GOLD account', self.html) if wait: wait_time = int(wait.group(1)) - self.log.info( "%s: All free slots occupied. Waiting %d minutes." % (self.__name__, wait_time) ) + self.logInfo( "%s: All free slots occupied. Waiting %d minutes." % (self.__name__, wait_time) ) self.setWait(wait_time * 60, False) wait = re.search(r'Please wait (\d+) sec', self.html) diff --git a/pyload/plugins/hoster/FileApeCom.py b/pyload/plugins/hoster/FileApeCom.py index 1f933e776..f5182a788 100644 --- a/pyload/plugins/hoster/FileApeCom.py +++ b/pyload/plugins/hoster/FileApeCom.py @@ -9,7 +9,7 @@ class FileApeCom(Hoster): __name__ = "FileApeCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?fileape\.com/(index\.php\?act=download\&id=|dl/)\w+" - __version__ = "0.1" + __version__ = "0.11" __description__ = """FileApe Download Hoster""" __author_name__ = ("espes") @@ -58,5 +58,5 @@ class FileApeCom(Hoster): check = self.checkDownload({"exp": "Download ticket expired"}) if check == "exp": - self.log.info("Ticket expired, retrying...") + self.logInfo("Ticket expired, retrying...") self.retry()
\ No newline at end of file diff --git a/pyload/plugins/hoster/FilesMailRu.py b/pyload/plugins/hoster/FilesMailRu.py index ee4ea4953..c7232f5dd 100644 --- a/pyload/plugins/hoster/FilesMailRu.py +++ b/pyload/plugins/hoster/FilesMailRu.py @@ -31,7 +31,7 @@ class FilesMailRu(Hoster): __name__ = "FilesMailRu" __type__ = "hoster" __pattern__ = r"http://files\.mail\.ru/.*" - __version__ = "0.3" + __version__ = "0.31" __description__ = """Files.Mail.Ru One-Klick Hoster""" __author_name__ = ("oZiRiz") __author_mail__ = ("ich@oziriz.de") @@ -95,5 +95,5 @@ class FilesMailRu(Hoster): # (Loading 100MB in to ram is not an option) check = self.checkDownload({"html": "<meta name="}, read_size=50000) if check == "html": - self.log.info(_("There was HTML Code in the Downloaded File("+ self.pyfile.name +")...redirect error? The Download will be restarted.")) + self.logInfo(_("There was HTML Code in the Downloaded File(%s)...redirect error? The Download will be restarted." % self.pyfile.name)) self.retry() diff --git a/pyload/plugins/hoster/MultiDebridCom.py b/pyload/plugins/hoster/MultiDebridCom.py index ca98e8a0e..7280504cb 100644 --- a/pyload/plugins/hoster/MultiDebridCom.py +++ b/pyload/plugins/hoster/MultiDebridCom.py @@ -23,7 +23,7 @@ from module.common.json_layer import json_loads class MultiDebridCom(Hoster): __name__ = "MultiDebridCom" - __version__ = "0.01" + __version__ = "0.02" __type__ = "hoster" __pattern__ = r"http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/" __description__ = """Multi-debrid.com hoster plugin""" @@ -36,7 +36,7 @@ class MultiDebridCom(Hoster): def process(self, pyfile): if not self.account: - self.logError("Please enter your Multi-debrid.com account or deactivate this plugin") + self.logError(_("Please enter your %s account or deactivate this plugin") % "Multi-debrid.com") self.fail("No Multi-debrid.com account provided") self.logDebug("Original URL: %s" % pyfile.url) diff --git a/pyload/plugins/hoster/NetloadIn.py b/pyload/plugins/hoster/NetloadIn.py index 39338c88d..c59080158 100644 --- a/pyload/plugins/hoster/NetloadIn.py +++ b/pyload/plugins/hoster/NetloadIn.py @@ -53,7 +53,7 @@ class NetloadIn(Hoster): __name__ = "NetloadIn" __type__ = "hoster" __pattern__ = r"https?://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)" - __version__ = "0.42" + __version__ = "0.43" __description__ = """Netload.in Download Hoster""" __author_name__ = ("spoob", "RaNaN", "Gregy") __author_mail__ = ("spoob@pyload.org", "ranan@pyload.org", "gregy@gregy.cz") @@ -78,7 +78,7 @@ class NetloadIn(Hoster): self.pyfile.name = self.api_data["filename"] if self.premium: - self.log.debug("Netload: Use Premium Account") + self.logDebug("Netload: Use Premium Account") return True if self.download_html(): @@ -107,7 +107,7 @@ class NetloadIn(Hoster): self.download_api_data(n+1) return - self.log.debug("Netload: APIDATA: "+src) + self.logDebug("Netload: APIDATA: "+src) self.api_data = {} if src and ";" in src and src not in ("unknown file_data", "unknown_server_data", "No input file specified."): lines = src.split(";") @@ -129,21 +129,21 @@ class NetloadIn(Hoster): def final_wait(self, page): wait_time = self.get_wait_time(page) self.setWait(wait_time) - self.log.debug("Netload: final wait %d seconds" % wait_time) + self.logDebug("Netload: final wait %d seconds" % wait_time) self.wait() self.url = self.get_file_url(page) def download_html(self): - self.log.debug("Netload: Entering download_html") + self.logDebug("Netload: Entering download_html") page = self.load(self.url, decode=True) t = time() + 30 if "/share/templates/download_hddcrash.tpl" in page: - self.log.error("Netload HDD Crash") + self.logError("Netload HDD Crash") self.fail(_("File temporarily not available")) if not self.api_data: - self.log.debug("API Data may be useless, get details from html page") + self.logDebug("API Data may be useless, get details from html page") if "* The file was deleted" in page: self.offline() @@ -163,21 +163,21 @@ class NetloadIn(Hoster): t = time() + 30 if "/share/templates/download_hddcrash.tpl" in page: - self.log.error("Netload HDD Crash") + self.logError("Netload HDD Crash") self.fail(_("File temporarily not available")) - self.log.debug("Netload: try number %d " % i) + self.logDebug("Netload: try number %d " % i) if ">Your download is being prepared.<" in page: - self.log.debug("Netload: We will prepare your download") + self.logDebug("Netload: We will prepare your download") self.final_wait(page) return True if ">An access request has been made from IP address <" in page: wait = self.get_wait_time(page) if wait == 0: - self.log.debug("Netload: Wait was 0 setting 30") + self.logDebug("Netload: Wait was 0 setting 30") wait = 30 - self.log.info(_("Netload: waiting between downloads %d s." % wait)) + self.logInfo(_("Netload: waiting between downloads %d s." % wait)) self.wantReconnect = True self.setWait(wait) self.wait() @@ -185,7 +185,7 @@ class NetloadIn(Hoster): return self.download_html() - self.log.debug("Netload: Trying to find captcha") + self.logDebug("Netload: Trying to find captcha") try: url_captcha_html = "http://netload.in/" + re.search('(index.php\?id=10&.*&captcha=1)', page).group(1).replace("amp;", "") @@ -197,7 +197,7 @@ class NetloadIn(Hoster): page = self.load(url_captcha_html, cookies=True) captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', page).group(1) except: - self.log.debug("Netload: Could not find captcha, try again from beginning") + self.logDebug("Netload: Could not find captcha, try again from beginning") captchawaited = False continue @@ -206,7 +206,7 @@ class NetloadIn(Hoster): wait = self.get_wait_time(page) if i == 0: self.pyfile.waitUntil = time() # don't wait contrary to time on web site else: self.pyfile.waitUntil = t - self.log.info(_("Netload: waiting for captcha %d s.") % (self.pyfile.waitUntil - time())) + self.logInfo(_("Netload: waiting for captcha %d s.") % (self.pyfile.waitUntil - time())) #self.setWait(wait) self.wait() captchawaited = True @@ -224,12 +224,12 @@ class NetloadIn(Hoster): if attempt is not None: return attempt.group(1) else: - self.log.debug("Netload: Backup try for final link") + self.logDebug("Netload: Backup try for final link") file_url_pattern = r"<a href=\"(.+)\" class=\"Orange_Link\">Click here" attempt = re.search(file_url_pattern, page) return "http://netload.in/"+attempt.group(1) except: - self.log.debug("Netload: Getting final link failed") + self.logDebug("Netload: Getting final link failed") return None def get_wait_time(self, page): @@ -238,7 +238,7 @@ class NetloadIn(Hoster): def proceed(self, url): - self.log.debug("Netload: Downloading..") + self.logDebug("Netload: Downloading..") self.download(url, disposition=True) diff --git a/pyload/plugins/hoster/Premium4Me.py b/pyload/plugins/hoster/Premium4Me.py index 582e3fc3a..0bdb22bd7 100644 --- a/pyload/plugins/hoster/Premium4Me.py +++ b/pyload/plugins/hoster/Premium4Me.py @@ -10,7 +10,7 @@ from pyload.utils.fs import fs_encode class Premium4Me(Hoster): __name__ = "Premium4Me" - __version__ = "0.07" + __version__ = "0.08" __type__ = "hoster" __pattern__ = r"http://premium.to/.*" @@ -24,7 +24,7 @@ class Premium4Me(Hoster): def process(self, pyfile): if not self.account: - self.logError(_("Please enter your premium.to account or deactivate this plugin")) + self.logError(_("Please enter your %s account or deactivate this plugin") % "premium.to") self.fail("No premium.to account provided") self.logDebug("premium.to: Old URL: %s" % pyfile.url) diff --git a/pyload/plugins/hoster/PremiumizeMe.py b/pyload/plugins/hoster/PremiumizeMe.py index 85be4ec72..7f332e58b 100644 --- a/pyload/plugins/hoster/PremiumizeMe.py +++ b/pyload/plugins/hoster/PremiumizeMe.py @@ -3,7 +3,7 @@ from pyload.utils import json_loads class PremiumizeMe(Hoster): __name__ = "PremiumizeMe" - __version__ = "0.11" + __version__ = "0.12" __type__ = "hoster" __description__ = """Premiumize.Me hoster plugin""" @@ -16,7 +16,7 @@ class PremiumizeMe(Hoster): def process(self, pyfile): # Check account if not self.account or not self.account.isUsable(): - self.logError(_("Please enter a valid premiumize.me account or deactivate this plugin")) + self.logError(_("Please enter your %s account or deactivate this plugin") % "premiumize.me") self.fail("No valid premiumize.me account provided") # In some cases hostsers do not supply us with a filename at download, so we are going to set a fall back filename (e.g. for freakshare or xfileshare) diff --git a/pyload/plugins/hoster/RapidshareCom.py b/pyload/plugins/hoster/RapidshareCom.py index 6aacd684e..150dd425d 100644 --- a/pyload/plugins/hoster/RapidshareCom.py +++ b/pyload/plugins/hoster/RapidshareCom.py @@ -50,7 +50,7 @@ class RapidshareCom(Hoster): __name__ = "RapidshareCom" __type__ = "hoster" __pattern__ = r"https?://[\w\.]*?rapidshare.com/(?:files/(?P<id>\d*?)/(?P<name>[^?]+)|#!download\|(?:\w+)\|(?P<id_new>\d+)\|(?P<name_new>[^|]+))" - __version__ = "1.38" + __version__ = "1.39" __description__ = """Rapidshare.com Download Hoster""" __config__ = [("server", "Cogent;Deutsche Telekom;Level(3);Level(3) #2;GlobalCrossing;Level(3) #3;Teleglobe;GlobalCrossing #2;TeliaSonera #2;Teleglobe #2;TeliaSonera #3;TeliaSonera", "Preferred Server", "None")] __author_name__ = ("spoob", "RaNaN", "mkaay") @@ -93,7 +93,7 @@ class RapidshareCom(Hoster): self.handleFree() elif self.api_data["status"] == "2": - self.log.info(_("Rapidshare: Traffic Share (direct download)")) + self.logInfo(_("Rapidshare: Traffic Share (direct download)")) self.pyfile.name = self.get_file_name() self.download(self.pyfile.url, get={"directstart":1}) @@ -113,24 +113,24 @@ class RapidshareCom(Hoster): #tmp = "#!download|%(server)s|%(id)s|%(name)s|%(size)s" download = "http://%(host)s/cgi-bin/rsapi.cgi?sub=download&editparentlocation=0&bin=1&fileid=%(id)s&filename=%(name)s&dlauth=%(auth)s" % self.dl_dict - self.log.debug("RS API Request: %s" % download) + self.logDebug("RS API Request: %s" % download) self.download(download, ref=False) check = self.checkDownload({"ip" : "You need RapidPro to download more files from your IP address", "auth" : "Download auth invalid"}) if check == "ip": self.setWait(60) - self.log.info(_("Already downloading from this ip address, waiting 60 seconds")) + self.logInfo(_("Already downloading from this ip address, waiting 60 seconds")) self.wait() self.handleFree() elif check == "auth": - self.log.info(_("Invalid Auth Code, download will be restarted")) + self.logInfo(_("Invalid Auth Code, download will be restarted")) self.offset += 5 self.handleFree() def handlePremium(self): - info = self.account.getAccountInfo(True) - self.log.debug("%s: Use Premium Account" % self.__name__) + info = self.account.getAccountInfo(self.user, True) + self.logDebug("%s: Use Premium Account" % self.__name__) url = self.api_data["mirror"] self.download(url, get={"directstart":1}) @@ -144,7 +144,7 @@ class RapidshareCom(Hoster): api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" api_param_file = {"sub": "checkfiles", "incmd5": "1", "files": self.id, "filenames": self.name} src = self.load(api_url_base, cookies=False, get=api_param_file).strip() - self.log.debug("RS INFO API: %s" % src) + self.logDebug("RS INFO API: %s" % src) if src.startswith("ERROR"): return fields = src.split(",") @@ -178,19 +178,19 @@ class RapidshareCom(Hoster): prepare = "https://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=%(id)s&filename=%(name)s&try=1&cbf=RSAPIDispatcher&cbid=1" % {"name": name, "id" : id} - self.log.debug("RS API Request: %s" % prepare) + self.logDebug("RS API Request: %s" % prepare) result = self.load(prepare, ref=False) - self.log.debug("RS API Result: %s" % result) + self.logDebug("RS API Result: %s" % result) between_wait = re.search("You need to wait (\d+) seconds", result) if "You need RapidPro to download more files from your IP address" in result: self.setWait(60) - self.log.info(_("Already downloading from this ip address, waiting 60 seconds")) + self.logInfo(_("Already downloading from this ip address, waiting 60 seconds")) self.wait() elif "Too many users downloading from this server right now" in result or "All free download slots are full" in result: self.setWait(120) - self.log.info(_("RapidShareCom: No free slots")) + self.logInfo(_("RapidShareCom: No free slots")) self.wait() elif "This file is too big to download it for free" in result: self.fail(_("You need a premium account for this file")) diff --git a/pyload/plugins/hoster/RealdebridCom.py b/pyload/plugins/hoster/RealdebridCom.py index 3c796232e..73baff5b3 100644 --- a/pyload/plugins/hoster/RealdebridCom.py +++ b/pyload/plugins/hoster/RealdebridCom.py @@ -12,7 +12,7 @@ from module.plugins.Hoster import Hoster class RealdebridCom(Hoster): __name__ = "RealdebridCom" - __version__ = "0.49" + __version__ = "0.51" __type__ = "hoster" __pattern__ = r"https?://.*real-debrid\..*" @@ -37,10 +37,10 @@ class RealdebridCom(Hoster): def process(self, pyfile): if not self.account: - self.logError(_("Please enter your Real-debrid account or deactivate this plugin")) + self.logError(_("Please enter your %s account or deactivate this plugin") % "Real-debrid") self.fail("No Real-debrid account provided") - self.log.debug("Real-Debrid: Old URL: %s" % pyfile.url) + self.logDebug("Real-Debrid: Old URL: %s" % pyfile.url) if re.match(self.__pattern__, pyfile.url): new_url = pyfile.url else: @@ -71,7 +71,7 @@ class RealdebridCom(Hoster): else: new_url = new_url.replace("https://", "http://") - self.log.debug("Real-Debrid: New URL: %s" % new_url) + self.logDebug("Real-Debrid: New URL: %s" % new_url) if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown") or pyfile.name.endswith('..'): #only use when name wasnt already set diff --git a/pyload/plugins/hoster/RehostTo.py b/pyload/plugins/hoster/RehostTo.py index 141dcb8c8..7d1b1c3ea 100644 --- a/pyload/plugins/hoster/RehostTo.py +++ b/pyload/plugins/hoster/RehostTo.py @@ -6,7 +6,7 @@ from module.plugins.Hoster import Hoster class RehostTo(Hoster): __name__ = "RehostTo" - __version__ = "0.11" + __version__ = "0.13" __type__ = "hoster" __pattern__ = r"https?://.*rehost.to\..*" __description__ = """rehost.com hoster plugin""" @@ -22,13 +22,13 @@ class RehostTo(Hoster): def process(self, pyfile): if not self.account: - self.log.error(_("Please enter your rehost.to account or deactivate this plugin")) + self.logError(_("Please enter your %s account or deactivate this plugin") % "rehost.to") self.fail("No rehost.to account provided") data = self.account.getAccountInfo(self.user) long_ses = data["long_ses"] - self.log.debug("Rehost.to: Old URL: %s" % pyfile.url) + self.logDebug("Rehost.to: Old URL: %s" % pyfile.url) new_url = "http://rehost.to/process_download.php?user=cookie&pass=%s&dl=%s" % (long_ses, quote(pyfile.url, "")) #raise timeout to 2min diff --git a/pyload/plugins/hoster/ReloadCc.py b/pyload/plugins/hoster/ReloadCc.py index 7dc6d9bb6..b39c2812c 100644 --- a/pyload/plugins/hoster/ReloadCc.py +++ b/pyload/plugins/hoster/ReloadCc.py @@ -6,7 +6,7 @@ from module.network.HTTPRequest import BadHeader class ReloadCc(Hoster): __name__ = "ReloadCc" - __version__ = "0.4" + __version__ = "0.5" __type__ = "hoster" __description__ = """Reload.Cc hoster plugin""" @@ -19,7 +19,7 @@ class ReloadCc(Hoster): def process(self, pyfile): # Check account if not self.account or not self.account.canUse(): - self.logError("Please enter a valid reload.cc account or deactivate this plugin") + self.logError(_("Please enter your %s account or deactivate this plugin") % "reload.cc") self.fail("No valid reload.cc account provided") # In some cases hostsers do not supply us with a filename at download, so we are going to set a fall back filename (e.g. for freakshare or xfileshare) diff --git a/pyload/plugins/hoster/ShareplaceCom.py b/pyload/plugins/hoster/ShareplaceCom.py index 1d4441925..c55f6703a 100644 --- a/pyload/plugins/hoster/ShareplaceCom.py +++ b/pyload/plugins/hoster/ShareplaceCom.py @@ -9,7 +9,7 @@ class ShareplaceCom(Hoster): __name__ = "ShareplaceCom" __type__ = "hoster" __pattern__ = r"(http://)?(www\.)?shareplace\.(com|org)/\?[a-zA-Z0-9]+" - __version__ = "0.1" + __version__ = "0.11" __description__ = """Shareplace.com Download Hoster""" __author_name__ = ("ACCakut, based on YourfilesTo by jeix and skydancer") __author_mail__ = ("none") @@ -31,7 +31,7 @@ class ShareplaceCom(Hoster): wait_time = self.get_waiting_time() self.setWait(wait_time) - self.log.debug("%s: Waiting %d seconds." % (self.__name__,wait_time)) + self.logDebug("%s: Waiting %d seconds." % (self.__name__,wait_time)) self.wait() def get_waiting_time(self): diff --git a/pyload/plugins/hoster/UlozTo.py b/pyload/plugins/hoster/UlozTo.py index 5c38fdaad..1c3891eb1 100644 --- a/pyload/plugins/hoster/UlozTo.py +++ b/pyload/plugins/hoster/UlozTo.py @@ -27,7 +27,7 @@ class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" __pattern__ = r"http://(\w*\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj.cz|zachowajto.pl)/(?:live/)?(?P<id>\w+/[^/?]*)" - __version__ = "0.92" + __version__ = "0.93" __description__ = """uloz.to""" __author_name__ = ("zoidberg") @@ -101,7 +101,7 @@ class UlozTo(SimpleHoster): captcha_id = inputs[captcha_id_field] captcha_text = self.decryptCaptcha("http://img.uloz.to/captcha/%s.png" % captcha_id) - self.log.debug(' CAPTCHA ID:' + captcha_id + ' CAPTCHA TEXT:' + captcha_text) + self.logDebug(' CAPTCHA ID:' + captcha_id + ' CAPTCHA TEXT:' + captcha_text) """ self.setStorage("captcha_id", captcha_id) diff --git a/pyload/plugins/hoster/UploadedTo.py b/pyload/plugins/hoster/UploadedTo.py index 4ae075cfa..f38336773 100644 --- a/pyload/plugins/hoster/UploadedTo.py +++ b/pyload/plugins/hoster/UploadedTo.py @@ -7,10 +7,11 @@ import re from time import sleep -from module.utils import html_unescape, parseFileSize, chunks +from module.utils import html_unescape, parseFileSize from module.plugins.Hoster import Hoster from module.network.RequestFactory import getURL +from module.plugins.Plugin import chunks from module.plugins.internal.CaptchaService import ReCaptcha key = "bGhGMkllZXByd2VEZnU5Y2NXbHhYVlZ5cEE1bkEzRUw=".decode('base64') @@ -87,7 +88,7 @@ class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" __pattern__ = r"https?://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)" - __version__ = "0.70" + __version__ = "0.71" __description__ = """Uploaded.net Download Hoster""" __author_name__ = ("spoob", "mkaay", "zoidberg", "netpok", "stickell") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz", "netpok@gmail.com", "l.stickell@yahoo.it") @@ -153,10 +154,10 @@ class UploadedTo(Hoster): def handlePremium(self): info = self.account.getAccountInfo(self.user, True) - self.log.debug("%(name)s: Use Premium Account (%(left)sGB left)" % {"name": self.__name__, + self.logDebug("%(name)s: Use Premium Account (%(left)sGB left)" % {"name": self.__name__, "left": info["trafficleft"] / 1024 / 1024}) if int(self.data[1]) / 1024 > info["trafficleft"]: - self.log.info(_("%s: Not enough traffic left" % self.__name__)) + self.logInfo(_("%s: Not enough traffic left" % self.__name__)) self.account.empty(self.user) self.resetAccount() self.fail(_("Traffic exceeded")) diff --git a/pyload/plugins/hoster/UploadheroCom.py b/pyload/plugins/hoster/UploadheroCom.py index a2348b9f9..65d6cc4e9 100644 --- a/pyload/plugins/hoster/UploadheroCom.py +++ b/pyload/plugins/hoster/UploadheroCom.py @@ -26,7 +26,7 @@ class UploadheroCom(SimpleHoster): __name__ = "UploadheroCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploadhero\.com?/dl/\w+" - __version__ = "0.13" + __version__ = "0.14" __description__ = """UploadHero.com plugin""" __author_name__ = ("mcmyst", "zoidberg") __author_mail__ = ("mcmyst@hotmail.fr", "zoidberg@mujmail.cz") @@ -67,10 +67,10 @@ class UploadheroCom(SimpleHoster): self.download(download_url) def handlePremium(self): - self.log.debug("%s: Use Premium Account" % self.__name__) + self.logDebug("%s: Use Premium Account" % self.__name__) self.html = self.load(self.pyfile.url) link = re.search(self.DOWNLOAD_URL_PATTERN, self.html).group(1) - self.log.debug("Downloading link : '%s'" % link) + self.logDebug("Downloading link : '%s'" % link) self.download(link) def checkErrors(self): diff --git a/pyload/plugins/hoster/UploadingCom.py b/pyload/plugins/hoster/UploadingCom.py index 84040eb4d..a98c3bf71 100644 --- a/pyload/plugins/hoster/UploadingCom.py +++ b/pyload/plugins/hoster/UploadingCom.py @@ -26,7 +26,7 @@ class UploadingCom(SimpleHoster): __name__ = "UploadingCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploading\.com/files/(?:get/)?(?P<ID>[\w\d]+)" - __version__ = "0.32" + __version__ = "0.33" __description__ = """Uploading.Com File Download Hoster""" __author_name__ = ("jeix", "mkaay", "zoidberg") __author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "zoidberg@mujmail.cz") @@ -80,7 +80,7 @@ class UploadingCom(SimpleHoster): response = json_loads(self.load(ajax_url, post = {'action': 'second_page', 'code': self.file_info['ID']})) if 'answer' in response and 'wait_time' in response['answer']: wait_time = int(response['answer']['wait_time']) - self.log.info("%s: Waiting %d seconds." % (self.__name__, wait_time)) + self.logInfo("%s: Waiting %d seconds." % (self.__name__, wait_time)) self.setWait(wait_time) self.wait() else: diff --git a/pyload/plugins/hoster/VeehdCom.py b/pyload/plugins/hoster/VeehdCom.py index d4422afc3..4486eb84a 100644 --- a/pyload/plugins/hoster/VeehdCom.py +++ b/pyload/plugins/hoster/VeehdCom.py @@ -11,13 +11,13 @@ class VeehdCom(Hoster): ('filename_spaces', 'bool', "Allow spaces in filename", 'False'), ('replacement_char', 'str', "Filename replacement character", '_'), ] - __version__ = '0.21' + __version__ = '0.22' __description__ = """Veehd.com Download Hoster""" __author_name__ = ('cat') __author_mail__ = ('cat@pyload') def _debug(self, msg): - self.log.debug('[%s] %s' % (self.__name__, msg)) + self.logDebug('[%s] %s' % (self.__name__, msg)) def setup(self): self.html = None diff --git a/pyload/plugins/hoster/WuploadCom.py b/pyload/plugins/hoster/WuploadCom.py index 5bc5e9ac7..3dab1b1bb 100644 --- a/pyload/plugins/hoster/WuploadCom.py +++ b/pyload/plugins/hoster/WuploadCom.py @@ -47,7 +47,7 @@ class WuploadCom(Hoster): __name__ = "WuploadCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?wupload\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?" - __version__ = "0.20" + __version__ = "0.21" __description__ = """Wupload com""" __author_name__ = ("jeix", "paulking") __author_mail__ = ("jeix@hasnomail.de", "") @@ -113,7 +113,7 @@ class WuploadCom(Hoster): def getDomain(self): result = json_loads( self.load(self.API_ADDRESS + "/utility?method=getWuploadDomainForCurrentIp&format=json", decode=True)) - self.log.debug("%s: response to get domain %s" % (self.__name__, result)) + self.logDebug("%s: response to get domain %s" % (self.__name__, result)) return result["FSApi_Utility"]["getWuploadDomainForCurrentIp"]["response"] def downloadPremium(self): diff --git a/pyload/plugins/hoster/Xdcc.py b/pyload/plugins/hoster/Xdcc.py index 723623f52..d0630bd29 100644 --- a/pyload/plugins/hoster/Xdcc.py +++ b/pyload/plugins/hoster/Xdcc.py @@ -32,7 +32,7 @@ from module.plugins.Hoster import Hoster class Xdcc(Hoster): __name__ = "Xdcc" - __version__ = "0.31" + __version__ = "0.32" __pattern__ = r'xdcc://.*?(/#?.*?)?/.*?/#?\d+/?' # xdcc://irc.Abjects.net/#channel/[XDCC]|Shit/#0004/ __type__ = "hoster" __config__ = [ @@ -59,7 +59,7 @@ class Xdcc(Hoster): for i in range(0,3): try: nmn = self.doDownload(pyfile.url) - self.log.debug("%s: Download of %s finished." % (self.__name__, nmn)) + self.logDebug("%s: Download of %s finished." % (self.__name__, nmn)) return except socket.error, e: if hasattr(e, "errno"): @@ -68,7 +68,7 @@ class Xdcc(Hoster): errno = e.args[0] if errno in (10054,): - self.log.debug("XDCC: Server blocked our ip, retry in 5 min") + self.logDebug("XDCC: Server blocked our ip, retry in 5 min") self.setWait(300) self.wait() continue @@ -176,10 +176,10 @@ class Xdcc(Hoster): if nick == msg["target"][0:len(nick)] and "PRIVMSG" == msg["action"]: if msg["text"] == "\x01VERSION\x01": - self.log.debug("XDCC: Sending CTCP VERSION.") + self.logDebug("XDCC: Sending CTCP VERSION.") sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface")) elif msg["text"] == "\x01TIME\x01": - self.log.debug("Sending CTCP TIME.") + self.logDebug("Sending CTCP TIME.") sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time.time())) elif msg["text"] == "\x01LAG\x01": pass # don't know how to answer @@ -212,12 +212,12 @@ class Xdcc(Hoster): self.pyfile.name = packname filename = save_join(location, packname) - self.log.info("XDCC: Downloading %s from %s:%d" % (packname, ip, port)) + self.logInfo("XDCC: Downloading %s from %s:%d" % (packname, ip, port)) self.pyfile.setStatus("downloading") newname = self.req.download(ip, port, filename, sock, self.pyfile.setProgress) if newname and newname != filename: - self.log.info("%(name)s saved as %(newname)s" % {"name": self.pyfile.name, "newname": newname}) + self.logInfo("%(name)s saved as %(newname)s" % {"name": self.pyfile.name, "newname": newname}) filename = newname # kill IRC socket diff --git a/pyload/plugins/hoster/YourfilesTo.py b/pyload/plugins/hoster/YourfilesTo.py index 7a8f327ca..4a192b32a 100644 --- a/pyload/plugins/hoster/YourfilesTo.py +++ b/pyload/plugins/hoster/YourfilesTo.py @@ -9,7 +9,7 @@ class YourfilesTo(Hoster): __name__ = "YourfilesTo" __type__ = "hoster" __pattern__ = r"(http://)?(www\.)?yourfiles\.(to|biz)/\?d=[a-zA-Z0-9]+" - __version__ = "0.2" + __version__ = "0.21" __description__ = """Youfiles.to Download Hoster""" __author_name__ = ("jeix", "skydancer") __author_mail__ = ("jeix@hasnomail.de", "skydancer@hasnomail.de") @@ -31,7 +31,7 @@ class YourfilesTo(Hoster): wait_time = self.get_waiting_time() self.setWait(wait_time) - self.log.debug("%s: Waiting %d seconds." % (self.__name__,wait_time)) + self.logDebug("%s: Waiting %d seconds." % (self.__name__,wait_time)) self.wait() def get_waiting_time(self): diff --git a/pyload/plugins/hoster/ZeveraCom.py b/pyload/plugins/hoster/ZeveraCom.py index 8be725d2f..92f9e4dcd 100644 --- a/pyload/plugins/hoster/ZeveraCom.py +++ b/pyload/plugins/hoster/ZeveraCom.py @@ -8,7 +8,7 @@ from time import sleep class ZeveraCom(Hoster): __name__ = "ZeveraCom" - __version__ = "0.20" + __version__ = "0.21" __type__ = "hoster" __pattern__ = r"http://zevera.com/.*" __description__ = """zevera.com hoster plugin""" @@ -21,7 +21,7 @@ class ZeveraCom(Hoster): def process(self, pyfile): if not self.account: - self.logError(_("Please enter your zevera.com account or deactivate this plugin")) + self.logError(_("Please enter your %s account or deactivate this plugin") % "zevera.com") self.fail("No zevera.com account provided") self.logDebug("zevera.com: Old URL: %s" % pyfile.url) |