diff options
Diffstat (limited to 'module/plugins/crypter')
28 files changed, 53 insertions, 53 deletions
diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 4ef476895..26805b5b8 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -21,7 +21,7 @@ class ChipDe(Crypter): try: f = re.search(r'"(http://video\.chip\.de/.+)"', self.html) except: - self.fail("Failed to find the URL") + self.fail(_("Failed to find the URL")) else: self.urls = [f.group(1)] self.logDebug("The file URL is %s" % self.urls[0]) diff --git a/module/plugins/crypter/CzshareComFolder.py b/module/plugins/crypter/CzshareComFolder.py index 8cca84e42..002d9a9c3 100644 --- a/module/plugins/crypter/CzshareComFolder.py +++ b/module/plugins/crypter/CzshareComFolder.py @@ -25,8 +25,8 @@ class CzshareComFolder(Crypter): m = re.search(self.FOLDER_PATTERN, html, re.S) if m is None: - self.fail("Parse error (FOLDER)") + self.error(_("FOLDER_PATTERN not found")) self.urls.extend(re.findall(self.LINK_PATTERN, m.group(1))) if not self.urls: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) diff --git a/module/plugins/crypter/DailymotionBatch.py b/module/plugins/crypter/DailymotionBatch.py index 5d2f53b38..3b9b82a0c 100644 --- a/module/plugins/crypter/DailymotionBatch.py +++ b/module/plugins/crypter/DailymotionBatch.py @@ -95,7 +95,7 @@ class DailymotionBatch(Crypter): self.logDebug("%s playlist\s found on channel \"%s\"" % (len(playlists), m_id)) if not playlists: - self.fail("No playlist available") + self.fail(_("No playlist available")) for p_id, p_name, p_owner in playlists: p_videos = self.getVideos(p_id) diff --git a/module/plugins/crypter/DataHuFolder.py b/module/plugins/crypter/DataHuFolder.py index 303b5835c..8cea48062 100644 --- a/module/plugins/crypter/DataHuFolder.py +++ b/module/plugins/crypter/DataHuFolder.py @@ -28,11 +28,11 @@ class DataHuFolder(SimpleCrypter): if u'K\xe9rlek add meg a jelsz\xf3t' in self.html: # Password protected password = self.getPassword() if password is '': - self.fail("No password specified, please set right password on Add package form and retry") + self.fail(_("No password specified, please set right password on Add package form and retry")) self.logDebug("The folder is password protected', 'Using password: " + password) self.html = self.load(pyfile.url, post={'mappa_pass': password}, decode=True) if u'Hib\xe1s jelsz\xf3' in self.html: # Wrong password - self.fail("Incorrect password, please set right password on Add package form and retry") + self.fail(_("Incorrect password, please set right password on Add package form and retry")) package_name, folder_name = self.getPackageNameAndFolder() @@ -42,4 +42,4 @@ class DataHuFolder(SimpleCrypter): if package_links: self.packages = [(package_name, package_links, folder_name)] else: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index e31c62185..4b5f8fc95 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -57,7 +57,7 @@ class DlProtectCom(SimpleCrypter): for errmsg in (">The password is incorrect", ">The security code is incorrect"): if errmsg in self.html: - self.fail(errmsg[1:]) + self.fail(_(errmsg[1:])) pattern = r'<a href="([^/].+?)" target="_blank">' return re.findall(pattern, self.html) diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py index 41c245c00..126a1f544 100644 --- a/module/plugins/crypter/DuckCryptInfo.py +++ b/module/plugins/crypter/DuckCryptInfo.py @@ -27,7 +27,7 @@ class DuckCryptInfo(Crypter): m = re.match(self.__pattern__, url) if m is None: - self.fail("Weird error in link") + self.fail(_("Weird error in link")) if str(m.group(1)) == "link": self.handleLink(url) else: @@ -43,7 +43,7 @@ class DuckCryptInfo(Crypter): cryptlinks = soup.findAll("div", attrs={"class": "folderbox"}) self.logDebug("Redirectet to " + str(cryptlinks)) if not cryptlinks: - self.error("No link found") + self.error(_("No link found")) for clink in cryptlinks: if clink.find("a"): self.handleLink(clink.find("a")['href']) @@ -54,4 +54,4 @@ class DuckCryptInfo(Crypter): soup = BeautifulSoup(src) self.urls = [soup.find("iframe")['src']] if not self.urls: - self.logInfo("No link found") + self.logInfo(_("No link found")) diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index 54c8d2df0..6af3194df 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -42,7 +42,7 @@ class EmbeduploadCom(Crypter): self.urls = self.getLocation(tmp_links) if not self.urls: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) def getLocation(self, tmp_links): diff --git a/module/plugins/crypter/FileserveComFolder.py b/module/plugins/crypter/FileserveComFolder.py index 42d0f3829..826350f6c 100644 --- a/module/plugins/crypter/FileserveComFolder.py +++ b/module/plugins/crypter/FileserveComFolder.py @@ -28,11 +28,11 @@ class FileserveComFolder(Crypter): folder = re.search(self.FOLDER_PATTERN, html, re.S) if folder is None: - self.fail("Parse error (FOLDER)") + self.error(_("FOLDER_PATTERN not found")) new_links.extend(re.findall(self.LINK_PATTERN, folder.group(1))) if new_links: self.urls = [map(lambda s: "http://fileserve.com%s" % s, new_links)] else: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) diff --git a/module/plugins/crypter/FreetexthostCom.py b/module/plugins/crypter/FreetexthostCom.py index 73a5c98dc..3fe51b913 100644 --- a/module/plugins/crypter/FreetexthostCom.py +++ b/module/plugins/crypter/FreetexthostCom.py @@ -20,6 +20,6 @@ class FreetexthostCom(SimpleCrypter): def getLinks(self): m = re.search(r'<div id="contentsinner">\s*(.+)<div class="viewcount">', self.html, re.S) if m is None: - self.fail("Unable to extract links | Plugin may be out-of-date") + self.error(_("Unable to extract links")) links = m.group(1) return links.strip().split("<br />\r\n") diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py index 4f551aa42..c831fb2de 100644 --- a/module/plugins/crypter/GooGl.py +++ b/module/plugins/crypter/GooGl.py @@ -27,4 +27,4 @@ class GooGl(Crypter): if 'longUrl' in rep: self.urls = [rep['longUrl']] else: - self.fail("Unable to expand shortened link") + self.fail(_("Unable to expand shortened link")) diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index 773e0bf8b..d35b2d8bc 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -44,7 +44,7 @@ class HoerbuchIn(Crypter): def decryptFolder(self, url): m = self.protection.search(url) if m is None: - self.fail("Bad URL") + self.fail(_("Bad URL")) url = m.group(0) self.pyfile.url = url diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py index af10f248c..3a31903ae 100644 --- a/module/plugins/crypter/LetitbitNetFolder.py +++ b/module/plugins/crypter/LetitbitNetFolder.py @@ -26,9 +26,9 @@ class LetitbitNetFolder(Crypter): folder = re.search(self.FOLDER_PATTERN, html, re.S) if folder is None: - self.fail("Parse error (FOLDER)") + self.error(_("FOLDER_PATTERN not found")) self.urls.extend(re.findall(self.LINK_PATTERN, folder.group(0))) if not self.urls: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index 96d737382..aa340f873 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -74,7 +74,7 @@ class LinkSaveIn(SimpleCrypter): if package_links: self.packages = [(package_name, package_links, folder_name)] else: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) def isOnline(self): @@ -121,7 +121,7 @@ class LinkSaveIn(SimpleCrypter): def handleErrors(self): if "The visitorpassword you have entered is wrong" in self.html: self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") - self.fail("Incorrect password, please set right password on 'Edit package' form and retry") + self.fail(_("Incorrect password, please set right password on 'Edit package' form and retry")) if self.captcha: if "Wrong code. Please retry" in self.html: @@ -196,7 +196,7 @@ class LinkSaveIn(SimpleCrypter): for (crypted, jk) in zip(vcrypted, vjk): package_links.extend(self._getLinks(crypted, jk)) except: - self.fail("Unable to decrypt CNL2 links") + self.fail(_("Unable to decrypt CNL2 links")) return package_links diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 8731d1d0f..0848338ec 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -29,7 +29,7 @@ class LinkdecrypterCom(Crypter): # API not working anymore self.urls = self.decryptHTML() if not self.urls: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) def decryptAPI(self): @@ -46,7 +46,7 @@ class LinkdecrypterCom(Crypter): self.logError("API", self.html) if self.html == 'INTERRUPTION(PASSWORD)': - self.fail("No or incorrect password") + self.fail(_("No or incorrect password")) return None @@ -69,7 +69,7 @@ class LinkdecrypterCom(Crypter): m = re.search(r"<p><i><b>([^<]+)</b></i></p>", self.html) msg = m.group(1) if m else "" - self.logInfo("Captcha protected link", result_type, msg) + self.logInfo(_("Captcha protected link"), result_type, msg) captcha = self.decryptCaptcha(captcha_url, result_type=result_type) if result_type == "positional": @@ -80,10 +80,10 @@ class LinkdecrypterCom(Crypter): elif self.PASSWORD_PATTERN in self.html: if self.passwords: password = self.passwords.pop(0) - self.logInfo("Password protected link, trying " + password) + self.logInfo(_("Password protected link, trying ") + password) self.html = self.load('http://linkdecrypter.com/', post={'password': password}, decode=True) else: - self.fail("No or incorrect password") + self.fail(_("No or incorrect password")) else: retries -= 1 diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 0c20f6499..4a9dc7769 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -27,7 +27,7 @@ class LixIn(Crypter): m = re.match(self.__pattern__, url) if m is None: - self.error("Unable to identify file ID") + self.error(_("Unable to identify file ID")) id = m.group("ID") self.logDebug("File id is %s" % id) @@ -36,7 +36,7 @@ class LixIn(Crypter): m = re.search(self.SUBMIT_PATTERN, self.html) if m is None: - self.error("Link doesn't seem valid") + self.error(_("Link doesn't seem valid")) m = re.search(self.CAPTCHA_PATTERN, self.html) if m: @@ -54,7 +54,7 @@ class LixIn(Crypter): m = re.search(self.LINK_PATTERN, self.html) if m is None: - self.error("Unable to find destination url") + self.error(_("Unable to find destination url")) else: self.urls = [m.group("link")] self.logDebug("Found link %s, adding to package" % self.urls[0]) diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py index 607c630e4..ae8f3fd44 100644 --- a/module/plugins/crypter/MediafireComFolder.py +++ b/module/plugins/crypter/MediafireComFolder.py @@ -54,4 +54,4 @@ class MediafireComFolder(Crypter): self.urls.append(url) if not self.urls: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index 54e9343e5..e894c8c5d 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -40,4 +40,4 @@ class MultiloadCz(Crypter): self.urls.extend([x[1] for x in m if x[0] not in ignored_set]) if not self.urls: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index a9f04f45f..801afc50b 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -74,7 +74,7 @@ class NCryptIn(Crypter): # Pack and return links if not package_links: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) self.packages = [(package_name, package_links, folder_name)] @@ -177,7 +177,7 @@ class NCryptIn(Crypter): if self.protection_type == "password": if "This password is invalid!" in self.cleanedHtml: self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") - self.fail("Incorrect password, please set right password on 'Edit package' form and retry") + self.fail(_("Incorrect password, please set right password on 'Edit package' form and retry")) if self.protection_type == "captcha": if "The securitycheck was wrong!" in self.cleanedHtml: @@ -229,7 +229,7 @@ class NCryptIn(Crypter): for (crypted, jk) in zip(vcrypted, vjk): package_links.extend(self._getLinks(crypted, jk)) except: - self.fail("Unable to decrypt CNL2 links") + self.fail(_("Unable to decrypt CNL2 links")) return package_links diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py index 03c62ba14..01774362c 100644 --- a/module/plugins/crypter/NetfolderIn.py +++ b/module/plugins/crypter/NetfolderIn.py @@ -29,7 +29,7 @@ class NetfolderIn(SimpleCrypter): if self.isPasswordProtected(): self.html = self.submitPassword() if not self.html: - self.fail("Incorrect password, please set right password on Add package form and retry") + self.fail(_("Incorrect password, please set right password on Add package form and retry")) # Get package name and folder (package_name, folder_name) = self.getPackageNameAndFolder() diff --git a/module/plugins/crypter/QuickshareCzFolder.py b/module/plugins/crypter/QuickshareCzFolder.py index cb6bd4696..7b2d336b3 100644 --- a/module/plugins/crypter/QuickshareCzFolder.py +++ b/module/plugins/crypter/QuickshareCzFolder.py @@ -25,8 +25,8 @@ class QuickshareCzFolder(Crypter): m = re.search(self.FOLDER_PATTERN, html, re.S) if m is None: - self.fail("Parse error (FOLDER)") + self.error(_("FOLDER_PATTERN not found")) self.urls.extend(re.findall(self.LINK_PATTERN, m.group(1))) if not self.urls: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 184e1a38e..a71c736b5 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -94,7 +94,7 @@ class RelinkUs(Crypter): if package_links: self.packages = [(package_name, package_links, folder_name)] else: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) def initPackage(self, pyfile): @@ -169,7 +169,7 @@ class RelinkUs(Crypter): if self.PASSWORD_ERROR_ROKEN in self.html: msg = "Incorrect password, please set right password on 'Edit package' form and retry" self.logDebug(msg) - self.fail(msg) + self.fail(_(msg)) if self.captcha: if self.CAPTCHA_ERROR_ROKEN in self.html: diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index d9b511cf5..fbeaa406c 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -35,7 +35,7 @@ class SafelinkingNet(Crypter): if m: self.urls = [m.group(1)] else: - self.fail("Couldn't find forwarded Link") + self.fail(_("Couldn't find forwarded Link")) else: postData = {"post-protect": "1"} @@ -53,7 +53,7 @@ class SafelinkingNet(Crypter): captcha = SolveMedia(self) captchaProvider = "Solvemedia" else: - self.fail("Error parsing captcha") + self.fail(_("Error parsing captcha")) challenge, response = captcha.challenge(captchaKey) postData['adcopy_challenge'] = challenge @@ -61,7 +61,7 @@ class SafelinkingNet(Crypter): self.html = self.load(url, post=postData) if "The password you entered was incorrect" in self.html: - self.fail("Incorrect Password") + self.fail(_("Incorrect Password")) if not "The CAPTCHA code you entered was wrong" in self.html: break diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 68a404f46..6b9b2c5f6 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -88,7 +88,7 @@ class SexuriaCom(Crypter): # Inform the user if no link could been extracted if linklist == []: - self.error("Could not extract any links") + self.error(_("Could not extract any links")) # Debug log self.logDebug("%d supported links" % len(linklist)) diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index bc79c5f70..8e89c98f9 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -149,7 +149,7 @@ class ShareLinksBiz(Crypter): def handleErrors(self): if "The inserted password was wrong" in self.html: self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") - self.fail("Incorrect password, please set right password on 'Edit package' form and retry") + self.fail(_("Incorrect password, please set right password on 'Edit package' form and retry")) if self.captcha: if "Your choice was wrong" in self.html: @@ -233,7 +233,7 @@ class ShareLinksBiz(Crypter): (crypted, jk) = self._getCipherParams() package_links.extend(self._getLinks(crypted, jk)) except: - self.fail("Unable to decrypt CNL2 links") + self.fail(_("Unable to decrypt CNL2 links")) return package_links diff --git a/module/plugins/crypter/UlozToFolder.py b/module/plugins/crypter/UlozToFolder.py index 8b763dd82..acb360ee4 100644 --- a/module/plugins/crypter/UlozToFolder.py +++ b/module/plugins/crypter/UlozToFolder.py @@ -26,10 +26,10 @@ class UlozToFolder(Crypter): new_links = [] for i in xrange(1, 100): - self.logInfo("Fetching links from page %i" % i) + self.logInfo(_("Fetching links from page %i") % i) m = re.search(self.FOLDER_PATTERN, html, re.S) if m is None: - self.fail("Parse error (FOLDER)") + self.error(_("FOLDER_PATTERN not found")) new_links.extend(re.findall(self.LINK_PATTERN, m.group(1))) m = re.search(self.NEXT_PAGE_PATTERN, html) @@ -38,9 +38,9 @@ class UlozToFolder(Crypter): else: break else: - self.logInfo("Limit of 99 pages reached, aborting") + self.logInfo(_("Limit of 99 pages reached, aborting")) if new_links: self.urls = [map(lambda s: "http://ulozto.net/%s" % s, new_links)] else: - self.fail("Could not extract any links") + self.fail(_("Could not extract any links")) diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index 94afe98ea..8f50f80aa 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -30,7 +30,7 @@ class UploadedToFolder(SimpleCrypter): if m: plain_link = 'http://uploaded.net/' + m.group('plain') else: - self.fail("Parse error - Unable to find plain url list") + self.error(_("Unable to find plain url list")) self.html = self.load(plain_link) package_links = self.html.split('\n')[:-1] diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py index 1cb1b0b10..3323d0ff4 100644 --- a/module/plugins/crypter/XupPl.py +++ b/module/plugins/crypter/XupPl.py @@ -20,4 +20,4 @@ class XupPl(Crypter): if 'location' in header: self.urls = [header['location']] else: - self.fail("Unable to find link") + self.fail(_("Unable to find link")) diff --git a/module/plugins/crypter/YoutubeBatch.py b/module/plugins/crypter/YoutubeBatch.py index e70003ab1..c5bcdd72d 100644 --- a/module/plugins/crypter/YoutubeBatch.py +++ b/module/plugins/crypter/YoutubeBatch.py @@ -123,7 +123,7 @@ class YoutubeBatch(Crypter): playlists = [self.getPlaylist(m_id)] if not playlists: - self.fail("No playlist available") + self.fail(_("No playlist available")) addedvideos = [] urlize = lambda x: "https://www.youtube.com/watch?v=" + x |