From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/crypter/DDLMusicOrg.py | 1 + module/plugins/crypter/DailymotionBatch.py | 6 ++++++ module/plugins/crypter/DuckCryptInfo.py | 2 ++ module/plugins/crypter/EmbeduploadCom.py | 1 + module/plugins/crypter/HoerbuchIn.py | 1 + module/plugins/crypter/LinkdecrypterCom.py | 5 ++--- module/plugins/crypter/NCryptIn.py | 6 ------ module/plugins/crypter/NetfolderIn.py | 3 +++ module/plugins/crypter/OneKhDe.py | 2 ++ module/plugins/crypter/TurbobitNetFolder.py | 1 + module/plugins/crypter/YoutubeBatch.py | 7 +++++++ 11 files changed, 26 insertions(+), 9 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/DDLMusicOrg.py b/module/plugins/crypter/DDLMusicOrg.py index a78794b6d..bd5560ed1 100644 --- a/module/plugins/crypter/DDLMusicOrg.py +++ b/module/plugins/crypter/DDLMusicOrg.py @@ -22,6 +22,7 @@ class DDLMusicOrg(Crypter): def setup(self): self.multiDL = False + def decrypt(self, pyfile): html = self.load(pyfile.url, cookies=True) diff --git a/module/plugins/crypter/DailymotionBatch.py b/module/plugins/crypter/DailymotionBatch.py index a0ed0e80f..5d2f53b38 100644 --- a/module/plugins/crypter/DailymotionBatch.py +++ b/module/plugins/crypter/DailymotionBatch.py @@ -26,6 +26,7 @@ class DailymotionBatch(Crypter): page = self.load(url, get=req) return json_loads(page) + def getPlaylistInfo(self, id): ref = "playlist/" + id req = {"fields": "name,owner.screenname"} @@ -38,6 +39,7 @@ class DailymotionBatch(Crypter): owner = playlist['owner.screenname'] return name, owner + def _getPlaylists(self, user_id, page=1): ref = "user/%s/playlists" % user_id req = {"fields": "id", "page": page, "limit": 100} @@ -53,9 +55,11 @@ class DailymotionBatch(Crypter): for item in self._getPlaylists(user_id, page + 1): yield item + def getPlaylists(self, user_id): return [(id,) + self.getPlaylistInfo(id) for id in self._getPlaylists(user_id)] + def _getVideos(self, id, page=1): ref = "playlist/%s/videos" % id req = {"fields": "url", "page": page, "limit": 100} @@ -71,9 +75,11 @@ class DailymotionBatch(Crypter): for item in self._getVideos(id, page + 1): yield item + def getVideos(self, playlist_id): return list(self._getVideos(playlist_id))[::-1] + def decrypt(self, pyfile): m = re.match(self.__pattern__, pyfile.url) m_id = m.group("ID") diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py index 29eeb4453..737ed59ec 100644 --- a/module/plugins/crypter/DuckCryptInfo.py +++ b/module/plugins/crypter/DuckCryptInfo.py @@ -33,6 +33,7 @@ class DuckCryptInfo(Crypter): else: self.handleFolder(m) + def handleFolder(self, m): src = self.load("http://duckcrypt.info/ajax/auth.php?hash=" + str(m.group(2))) m = re.match(self.__pattern__, src) @@ -47,6 +48,7 @@ class DuckCryptInfo(Crypter): if clink.find("a"): self.handleLink(clink.find("a")['href']) + def handleLink(self, url): src = self.load(url) soup = BeautifulSoup(src) diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index 71c4d5778..8e4f5da07 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -44,6 +44,7 @@ class EmbeduploadCom(Crypter): if not self.urls: self.fail('Could not extract any links') + def getLocation(self, tmp_links): new_links = [] for link in tmp_links: diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index 34e124d82..773e0bf8b 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -40,6 +40,7 @@ class HoerbuchIn(Crypter): else: self.urls = self.decryptFolder(pyfile.url) + def decryptFolder(self, url): m = self.protection.search(url) if m is None: diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index c72092a5f..0358d1308 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -24,7 +24,6 @@ class LinkdecrypterCom(Crypter): def decrypt(self, pyfile): - self.passwords = self.getPassword().splitlines() # API not working anymore @@ -32,8 +31,8 @@ class LinkdecrypterCom(Crypter): if not self.urls: self.fail('Could not extract any links') - def decryptAPI(self): + def decryptAPI(self): get_dict = {"t": "link", "url": self.pyfile.url, "lcache": "1"} self.html = self.load('http://linkdecrypter.com/api', get=get_dict) if self.html.startswith('http://'): @@ -51,8 +50,8 @@ class LinkdecrypterCom(Crypter): return None - def decryptHTML(self): + def decryptHTML(self): retries = 5 post_dict = {"link_cache": "on", "pro_links": self.pyfile.url, "modo_links": "text"} diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 28a0735a5..ef696dbd8 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -131,7 +131,6 @@ class NCryptIn(Crypter): def unlockProtection(self): - postData = {} form = re.search(r'
', self.cleanedHtml, re.DOTALL).group(1) @@ -210,7 +209,6 @@ class NCryptIn(Crypter): def handleSingleLink(self): - self.logDebug("Handling Single link") package_links = [] @@ -223,7 +221,6 @@ class NCryptIn(Crypter): def handleCNL2(self): - self.logDebug("Handling CNL2 links") package_links = [] @@ -239,7 +236,6 @@ class NCryptIn(Crypter): def handleContainers(self): - self.logDebug("Handling Container links") package_links = [] @@ -254,7 +250,6 @@ class NCryptIn(Crypter): def handleWebLinks(self): - self.logDebug("Handling Web links") pattern = r'(http://ncrypt\.in/link-.*?=)' links = re.findall(pattern, self.html) @@ -280,7 +275,6 @@ class NCryptIn(Crypter): def _getCipherParams(self): - pattern = r'