From 50607322e6b15a4a406faf38da1e12793f46c3a3 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Wed, 13 Mar 2013 20:52:46 +0100 Subject: Movie2kTo: Corrected package name this plugin returns. --- module/plugins/crypter/Movie2kTo.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index f5800b498..47257f2dc 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -47,13 +47,14 @@ class Movie2kTo(Crypter): season_links += self.getInfoAndLinks('%s/%s' % (self.BASE_URL, url_path)) self.logDebug(season_links) - self.packages.append(('%s: Season %s (%s)' - % (self.name, season, self.qStat()), season_links, 'Season %s' % season)) + folder = '%s: Season %s' % (self.name, season) + name = '%s%s' % (folder, self.qStat()) + self.packages.append((name, season_links, folder)) self.qStatReset() else: links = self.getLinks() - self.package.name = '%s%s' % (self.package.name, self.qStat()) - self.packages.append((self.package.name, links , self.package.folder)) + name = '%s%s' % (self.package.name, self.qStat()) + self.packages.append((name, links , self.package.folder)) def qStat(self): if len(self.q) == 0: return '' -- cgit v1.2.3 From ed22eec779531674fb5f770c5fa2a8b632f552c4 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Mon, 18 Mar 2013 10:36:52 +0100 Subject: Movie2kTo: Added setting for quality in the folder name. You set if you want the quality output be part of the folder name. --- module/plugins/crypter/Movie2kTo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index 47257f2dc..e0e923abb 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -9,8 +9,9 @@ class Movie2kTo(Crypter): __name__ = 'Movie2kTo' __type__ = 'container' __pattern__ = r'http://(?:www\.)?movie2k\.to/(.*)\.html' - __version__ = '0.3' + __version__ = '0.4' __config__ = [('accepted_hosters', 'str', 'List of accepted hosters', 'Xvidstage, '), + ('dir_quality', 'bool', 'Show the quality of the footage in the folder name', 'True'), ('whole_season', 'bool', 'Download whole season', 'False'), ('everything', 'bool', 'Download everything', 'False'), ('firstN', 'int', 'Download the first N files for each episode. The first file is probably all you will need.', '1')] @@ -58,6 +59,7 @@ class Movie2kTo(Crypter): def qStat(self): if len(self.q) == 0: return '' + if not self.getConfig('dir_quality'): return '' return (' (Average quality: %d, min: %d, max: %d, %s, max (all hosters): %d)' % (sum(self.q) / float(len(self.q)), min(self.q), max(self.q), self.q, self.max_q)) def qStatReset(self): -- cgit v1.2.3 From c6d4e6ec21593038d4a9dbe280fc7de02ffead13 Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 6 Apr 2013 12:53:39 +0300 Subject: UploadedToFolder: updated pattern (see #63) + license + cosmetics --- module/plugins/crypter/UploadedToFolder.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index d4534297e..e92601b24 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -1,13 +1,30 @@ # -*- coding: utf-8 -*- -from module.plugins.Crypter import Crypter +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see . # +############################################################################ + import re +from module.plugins.Crypter import Crypter + + class UploadedToFolder(Crypter): __name__ = "UploadedToFolder" __type__ = "crypter" - __pattern__ = r"http://(?:www\.)?(uploaded|ul)\.(to|net)/(f|list)/(?P\w+)" - __version__ = "0.1" + __pattern__ = r"http://(?:www\.)?(uploaded|ul)\.(to|net)/(f|folder|list)/(?P\w+)" + __version__ = "0.2" __description__ = """UploadedTo Crypter Plugin""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") -- cgit v1.2.3 From ecfbaded5e03529d1b189b6b5fc8b2f8516c4b31 Mon Sep 17 00:00:00 2001 From: enkore Date: Sat, 6 Apr 2013 20:21:43 +0200 Subject: Add hoster plugin for ARD mediathek --- module/plugins/hoster/ARD.py | 80 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 module/plugins/hoster/ARD.py (limited to 'module') diff --git a/module/plugins/hoster/ARD.py b/module/plugins/hoster/ARD.py new file mode 100644 index 000000000..60a40e69d --- /dev/null +++ b/module/plugins/hoster/ARD.py @@ -0,0 +1,80 @@ + +import subprocess +import re +import os.path +import os + +from module.utils import save_join, save_path +from module.plugins.Hoster import Hoster + +# Requires rtmpdump +# by Roland Beermann + +class RTMP: + # TODO: Port to some RTMP-library like rtmpy or similar + # TODO?: Integrate properly into the API of pyLoad + + command = "rtmpdump" + + @classmethod + def download_rtmp_stream(cls, url, output_file, playpath=None): + opts = [ + "-r", url, + "-o", output_file, + ] + if playpath: + opts.append("--playpath") + opts.append(playpath) + + cls._invoke_rtmpdump(opts) + + @classmethod + def _invoke_rtmpdump(cls, opts): + args = [ + cls.command + ] + args.extend(opts) + + return subprocess.check_call(args) + +class ARD(Hoster): + __name__ = "ARD Mediathek" + __version__ = "0.1" + __pattern__ = r"http://www\.ardmediathek\.de/.*" + __config__ = [] + + def process(self, pyfile): + site = self.load(pyfile.url) + + avail_videos = re.findall(r"""mediaCollection.addMediaStream\(0, ([0-9]*), "([^\"]*)", "([^\"]*)", "[^\"]*"\);""", site) + avail_videos.sort(key=lambda videodesc: int(videodesc[0]), reverse=True) # The higher the number, the better the quality + + quality, url, playpath = avail_videos[0] + + pyfile.name = re.search(r"

([^<]*)

", site).group(1) + + if url.startswith("http"): + # Best quality is available over HTTP. Very rare. + self.download(url) + else: + pyfile.setStatus("downloading") + + download_folder = self.config['general']['download_folder'] + + location = save_join(download_folder, pyfile.package().folder) + + if not os.path.exists(location): + os.makedirs(location, int(self.core.config["permission"]["folder"], 8)) + + if self.core.config["permission"]["change_dl"] and os.name != "nt": + try: + uid = getpwnam(self.config["permission"]["user"])[2] + gid = getgrnam(self.config["permission"]["group"])[2] + + chown(location, uid, gid) + except Exception, e: + self.log.warning(_("Setting User and Group failed: %s") % str(e)) + + output_file = save_join(location, save_path(pyfile.name)) + + RTMP.download_rtmp_stream(url, playpath=playpath, output_file=output_file) -- cgit v1.2.3 From d8f2b5d9046f4cca3a8d0cd5c5dd297526ea870e Mon Sep 17 00:00:00 2001 From: enkore Date: Sat, 6 Apr 2013 20:43:48 +0200 Subject: ARD: Correct file extension --- module/plugins/hoster/ARD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/hoster/ARD.py b/module/plugins/hoster/ARD.py index 60a40e69d..5ab65cd4b 100644 --- a/module/plugins/hoster/ARD.py +++ b/module/plugins/hoster/ARD.py @@ -75,6 +75,6 @@ class ARD(Hoster): except Exception, e: self.log.warning(_("Setting User and Group failed: %s") % str(e)) - output_file = save_join(location, save_path(pyfile.name)) + output_file = save_join(location, save_path(pyfile.name)) + os.path.splitext(playpath)[1] RTMP.download_rtmp_stream(url, playpath=playpath, output_file=output_file) -- cgit v1.2.3 From b89bc76f6cc8fa64b16eee42a0e00fdc2ddf13cc Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 6 Apr 2013 21:33:52 +0200 Subject: DebridItaliaCom: fail instead of offline to allow revert to traditional download --- module/plugins/hoster/DebridItaliaCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 121a141b3..470c4ae5d 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -47,7 +47,7 @@ class DebridItaliaCom(Hoster): self.logDebug("XML data: %s" % page) if 'File not available' in page: - self.offline() + self.fail('File not available') else: new_url = re.search(r'(?P[^<]+)', page).group('direct') -- cgit v1.2.3 From cf299b2955c82bd13efd61446570df8baef942ff Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 6 Apr 2013 21:38:27 +0200 Subject: NetfolderIn, SimpleCrypter: stripping folder name. + cosmetics --- module/plugins/crypter/NetfolderIn.py | 35 +++++++++++++++----------------- module/plugins/internal/SimpleCrypter.py | 2 +- 2 files changed, 17 insertions(+), 20 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py index d71a73d0a..956727d87 100644 --- a/module/plugins/crypter/NetfolderIn.py +++ b/module/plugins/crypter/NetfolderIn.py @@ -1,22 +1,23 @@ # -*- coding: utf-8 -*- -from module.plugins.Crypter import Crypter import re +from module.plugins.Crypter import Crypter + + class NetfolderIn(Crypter): __name__ = "NetfolderIn" __type__ = "crypter" __pattern__ = r"http://(?:www\.)?netfolder.in/((?P\w+)/\w+|folder.php\?folder_id=(?P\w+))" - __version__ = "0.4" + __version__ = "0.5" __description__ = """NetFolder Crypter Plugin""" __author_name__ = ("RaNaN", "fragonib") __author_mail__ = ("RaNaN@pyload.org", "fragonib[AT]yahoo[DOT]es") def decrypt(self, pyfile): - # Request package self.html = self.load(pyfile.url) - + # Check for password protection if self.isPasswordProtected(): self.html = self.submitPassword() @@ -31,45 +32,42 @@ class NetfolderIn(Crypter): # Set package self.packages = [(package_name, package_links, folder_name)] - - + def isPasswordProtected(self): - + if '' in html: self.logDebug("Incorrect password, please set right password on Edit package form and retry") return None - - return html - - + + return html + def getPackageNameAndFolder(self): title_re = r'
Inhalt des Ordners (?P.+)</span></div>' m = re.search(title_re, self.html) if m is not None: - name = folder = m.group('title') + name = folder = m.group('title').strip() self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) return name, folder else: @@ -77,8 +75,7 @@ class NetfolderIn(Crypter): folder = self.pyfile.package().folder self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) return name, folder - - + def getLinks(self): links = re.search(r'name="list" value="(.*?)"', self.html).group(1).split(",") self.logDebug("Package has %d links" % len(links)) diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index b2cc03985..c9e350e86 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -57,7 +57,7 @@ class SimpleCrypter(Crypter): if hasattr(self, 'TITLE_PATTERN'): m = re.search(self.TITLE_PATTERN, self.html) if m: - name = folder = m.group('title') + name = folder = m.group('title').strip() self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) return name, folder -- cgit v1.2.3 From d2cd60cc6dbaa7aceb1d1cd3019aa7089ddfdcd9 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Sat, 6 Apr 2013 21:50:25 +0200 Subject: Using SimpleCrypter to avoid repeating getPackageNameAndFolder. + licenses + cosmetics --- module/plugins/crypter/GooGl.py | 15 ++++++++++++ module/plugins/crypter/NetfolderIn.py | 21 ++++------------- module/plugins/crypter/SpeedLoadOrgFolder.py | 15 ++++++++++++ module/plugins/crypter/UploadedToFolder.py | 35 ++++++++++++++++------------ 4 files changed, 55 insertions(+), 31 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py index 07de5e008..bcb1d7494 100644 --- a/module/plugins/crypter/GooGl.py +++ b/module/plugins/crypter/GooGl.py @@ -1,5 +1,20 @@ # -*- coding: utf-8 -*- +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ + from module.plugins.Crypter import Crypter from module.common.json_layer import json_loads diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py index 956727d87..c5c602c27 100644 --- a/module/plugins/crypter/NetfolderIn.py +++ b/module/plugins/crypter/NetfolderIn.py @@ -2,18 +2,20 @@ import re -from module.plugins.Crypter import Crypter +from module.plugins.internal.SimpleCrypter import SimpleCrypter -class NetfolderIn(Crypter): +class NetfolderIn(SimpleCrypter): __name__ = "NetfolderIn" __type__ = "crypter" __pattern__ = r"http://(?:www\.)?netfolder.in/((?P<id1>\w+)/\w+|folder.php\?folder_id=(?P<id2>\w+))" - __version__ = "0.5" + __version__ = "0.6" __description__ = """NetFolder Crypter Plugin""" __author_name__ = ("RaNaN", "fragonib") __author_mail__ = ("RaNaN@pyload.org", "fragonib[AT]yahoo[DOT]es") + TITLE_PATTERN = r'<div class="Text">Inhalt des Ordners <span(.*)>(?P<title>.+)</span></div>' + def decrypt(self, pyfile): # Request package self.html = self.load(pyfile.url) @@ -63,19 +65,6 @@ class NetfolderIn(Crypter): return html - def getPackageNameAndFolder(self): - title_re = r'<div class="Text">Inhalt des Ordners <span(.*)>(?P<title>.+)</span></div>' - m = re.search(title_re, self.html) - if m is not None: - name = folder = m.group('title').strip() - self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) - return name, folder - else: - name = self.pyfile.package().name - folder = self.pyfile.package().folder - self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) - return name, folder - def getLinks(self): links = re.search(r'name="list" value="(.*?)"', self.html).group(1).split(",") self.logDebug("Package has %d links" % len(links)) diff --git a/module/plugins/crypter/SpeedLoadOrgFolder.py b/module/plugins/crypter/SpeedLoadOrgFolder.py index 5b350787f..f85ede6f3 100644 --- a/module/plugins/crypter/SpeedLoadOrgFolder.py +++ b/module/plugins/crypter/SpeedLoadOrgFolder.py @@ -1,5 +1,20 @@ # -*- coding: utf-8 -*- +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ + from module.plugins.internal.SimpleCrypter import SimpleCrypter class SpeedLoadOrgFolder(SimpleCrypter): diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index d4534297e..7fe4de688 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -1,13 +1,30 @@ # -*- coding: utf-8 -*- -from module.plugins.Crypter import Crypter +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ + import re -class UploadedToFolder(Crypter): +from module.plugins.internal.SimpleCrypter import SimpleCrypter + + +class UploadedToFolder(SimpleCrypter): __name__ = "UploadedToFolder" __type__ = "crypter" __pattern__ = r"http://(?:www\.)?(uploaded|ul)\.(to|net)/(f|list)/(?P<id>\w+)" - __version__ = "0.1" + __version__ = "0.2" __description__ = """UploadedTo Crypter Plugin""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") @@ -31,15 +48,3 @@ class UploadedToFolder(Crypter): self.logDebug('Package has %d links' % len(package_links)) self.packages = [(package_name, package_links, folder_name)] - - def getPackageNameAndFolder(self): - m = re.search(self.TITLE_PATTERN, self.html) - if m: - name = folder = m.group('title') - self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) - return name, folder - else: - name = self.pyfile.package().name - folder = self.pyfile.package().folder - self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) - return name, folder -- cgit v1.2.3 From 73792d869620ea1a2aca4a0dbda67fb9b87b29c7 Mon Sep 17 00:00:00 2001 From: enkore <public@enkore.de> Date: Sun, 7 Apr 2013 00:36:13 +0200 Subject: Add XVideosCom hoster --- module/plugins/hoster/XVideosCom.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 module/plugins/hoster/XVideosCom.py (limited to 'module') diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py new file mode 100644 index 000000000..b7f3f7b58 --- /dev/null +++ b/module/plugins/hoster/XVideosCom.py @@ -0,0 +1,19 @@ + +import re +import urllib + +from module.plugins.Hoster import Hoster + +class XVideosCom(Hoster): + __name__ = "XVideos.com" + __version__ = "0.1" + __pattern__ = r"http://www\.xvideos\.com/video([0-9]+)/.*" + __config__ = [] + + def process(self, pyfile): + site = self.load(pyfile.url) + pyfile.name = "%s (%s).flv" %( + re.search(r"<h2>([^<]+)<span", site).group(1), + re.search(self.__pattern__, pyfile.url).group(1), + ) + self.download(urllib.unquote(re.search(r"flv_url=([^&]+)&", site).group(1))) -- cgit v1.2.3 From ee9b85107eaa710b9f6e3f92cc27f640c286d9d8 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Sun, 7 Apr 2013 14:08:18 +0200 Subject: UploadedTo: fixed #68 --- module/plugins/hoster/UploadedTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 5d8c9a5ac..874b04d64 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -14,7 +14,7 @@ key = "bGhGMkllZXByd2VEZnU5Y2NXbHhYVlZ5cEE1bkEzRUw=".decode('base64') def getID(url): """ returns id from file url""" - m = re.match(r"http://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=)(?P<ID>\w+)", url) + m = re.match(r"http://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)", url) return m.group('ID') @@ -78,7 +78,7 @@ class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" __pattern__ = r"http://[\w\.-]*?(uploaded\.(to|net)(/file/|/?\?id=|.*?&id=)|ul\.to/)\w+" - __version__ = "0.65" + __version__ = "0.66" __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") -- cgit v1.2.3 From 615e2d11ad54089caab4b61be1b1722b1131b2a5 Mon Sep 17 00:00:00 2001 From: enkore <public@enkore.de> Date: Sun, 7 Apr 2013 14:13:01 +0200 Subject: Ported YoutubeBatch to new google api Now playlists with more than a dozen or so videos work TODO: Add support for downloading channels --- module/plugins/crypter/YoutubeBatch.py | 35 ++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/YoutubeBatch.py b/module/plugins/crypter/YoutubeBatch.py index 2e68dfe02..567191bb9 100644 --- a/module/plugins/crypter/YoutubeBatch.py +++ b/module/plugins/crypter/YoutubeBatch.py @@ -2,26 +2,41 @@ # -*- coding: utf-8 -*- import re +import json from module.plugins.Crypter import Crypter +API_KEY = "AIzaSyCKnWLNlkX-L4oD1aEzqqhRw1zczeD6_k0" + class YoutubeBatch(Crypter): __name__ = "YoutubeBatch" __type__ = "container" - __pattern__ = r"http://(?:[^/]*?)youtube\.com/((?:view_play_list|playlist|.*?feature=PlayList).*?[\?&](?:list|p)=|user/)(\w+)" + __pattern__ = r"http://(?:[^/]*?)youtube\.com/((?:view_play_list|playlist|.*?feature=PlayList).*?[\?&](?:list|p)=)([a-zA-Z0-9-_]+)" __version__ = "0.92" __description__ = """Youtube.com Channel Download Plugin""" - __author_name__ = ("RaNaN", "Spoob", "zoidberg") - __author_mail__ = ("RaNaN@pyload.org", "spoob@pyload.org", "zoidberg@mujmail.cz") + __author_name__ = ("RaNaN", "Spoob", "zoidberg", "roland") + __author_mail__ = ("RaNaN@pyload.org", "spoob@pyload.org", "zoidberg@mujmail.cz", "roland@enkore.de") + + def get_videos(self, playlist_id, token=None): + url = "https://www.googleapis.com/youtube/v3/playlistItems?playlistId=%s&part=snippet&key=%s&maxResults=50" % (playlist_id, API_KEY) + if token: + url += "&pageToken=" + token + + response = json.loads(self.load(url)) + + for item in response["items"]: + if item["kind"] == "youtube#playlistItem" and item["snippet"]["resourceId"]["kind"] == "youtube#video": + yield "http://youtube.com/watch?v=" + item["snippet"]["resourceId"]["videoId"] + + if "nextPageToken" in response: + for item in self.get_videos(playlist_id, response["nextPageToken"]): + yield item def decrypt(self, pyfile): match_id = re.match(self.__pattern__, self.pyfile.url) - if match_id.group(1) == "user/": - url = "http://gdata.youtube.com/feeds/api/users/%s/uploads?v=2" % match_id.group(2) - else: - url = "http://gdata.youtube.com/feeds/api/playlists/%s?v=2" % match_id.group(2) - - rep = self.load(url) new_links = [] - new_links.extend(re.findall(r"href\='(http:\/\/www.youtube.com\/watch\?v\=[^']+)&", rep)) + playlist_id = match_id.group(2) + + new_links.extend(self.get_videos(playlist_id)) + self.packages.append((self.pyfile.package().name, new_links, self.pyfile.package().name)) -- cgit v1.2.3 From e0b97f04b6bf8dac024cf1c15f640cab1a687098 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Sun, 7 Apr 2013 20:47:16 +0200 Subject: FilefactoryCom: fixes #70 --- module/plugins/hoster/FilefactoryCom.py | 88 ++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 39 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 66d26c999..b3eb4c865 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -8,6 +8,9 @@ from module.common.json_layer import json_loads import re +# Test links (random.bin): +# http://www.filefactory.com/file/ymxkmdud2o3/n/random.bin + def checkFile(plugin, urls): url_dict = {} @@ -34,7 +37,7 @@ class FilefactoryCom(Hoster): __name__ = "FilefactoryCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?filefactory\.com/file/(?P<id>[a-zA-Z0-9]+).*" # URLs given out are often longer but this is the requirement - __version__ = "0.36" + __version__ = "0.37" __description__ = """Filefactory.Com File Download Hoster""" __author_name__ = ("paulking", "zoidberg") @@ -48,7 +51,8 @@ class FilefactoryCom(Hoster): FILE_CHECK_PATTERN = r'check:\s*\'(?P<check>.*?)\'' CAPTCHA_KEY_PATTERN = r'Recaptcha.create\(\s*"(.*?)",' WAIT_PATTERN = r'id="startWait" value="(?P<wait>\d+)"' - FILE_URL_PATTERN = r'<p[^>]*?id="downloadLinkTarget"[^>]*>\s*<a href="(?P<url>.*?)"' + FILE_URL_PATTERN = r'<p[^>]*?id="downloadLinkTarget"[^>]*>\s*<a href="(?P<url>.*?)"' + def setup(self): self.multiDL = self.resumeDownloads = self.premium @@ -90,46 +94,52 @@ class FilefactoryCom(Hoster): elif "All free download slots on this server are currently in use" in self.html: self.retry(50, 900, "All free slots are busy") - # Check Id - self.check = re.search(self.FILE_CHECK_PATTERN, self.html).group('check') - self.logDebug("File check code is [%s]" % self.check) - - # Resolve captcha - found = re.search(self.CAPTCHA_KEY_PATTERN, self.html) - recaptcha_key = found.group(1) if found else "6LeN8roSAAAAAPdC1zy399Qei4b1BwmSBSsBN8zm" - recaptcha = ReCaptcha(self) - - # Try up to 5 times - for i in range(5): - challenge, code = recaptcha.challenge(recaptcha_key) - response = json_loads(self.load("http://www.filefactory.com/file/checkCaptcha.php", - post={"check" : self.check, "recaptcha_challenge_field" : challenge, "recaptcha_response_field" : code})) - if response['status'] == 'ok': - self.correctCaptcha() - break - else: - self.invalidCaptcha() - else: - self.fail("No valid captcha after 5 attempts") - - # This will take us to a wait screen - waiturl = "http://www.filefactory.com" + response['path'] - self.logDebug("Fetching wait with url [%s]" % waiturl) - waithtml = self.load(waiturl, decode=True) - found = re.search(r'<a href="(http://www.filefactory.com/dlf/.*?)"', waithtml) - waithtml = self.load(found.group(1), decode=True) + url = re.search(r"document\.location\.host \+\s*'(.+)';", self.html).group(1) + if not url.startswith('"http://"'): + url = 'http://www.filefactory.com' + url + self.html = self.load(url, decode=True) - # Find the wait value and wait - wait = int(re.search(self.WAIT_PATTERN, waithtml).group('wait')) - self.logDebug("Waiting %d seconds." % wait) - self.setWait(wait, True) + direct = re.search(r'data-href-direct="(.*)" class="button', self.html).group(1) + waittime = re.search(r'id="startWait" value="(\d+)"', self.html).group(1) + self.setWait(waittime) self.wait() - # Now get the real download url and retrieve the file - url = re.search(self.FILE_URL_PATTERN,waithtml).group('url') - # this may either download our file or forward us to an error page - self.logDebug("Download URL: %s" % url) - self.download(url) + # # Resolve captcha + # found = re.search(self.CAPTCHA_KEY_PATTERN, self.html) + # recaptcha_key = found.group(1) if found else "6LeN8roSAAAAAPdC1zy399Qei4b1BwmSBSsBN8zm" + # recaptcha = ReCaptcha(self) + # + # # Try up to 5 times + # for i in range(5): + # challenge, code = recaptcha.challenge(recaptcha_key) + # response = json_loads(self.load("http://www.filefactory.com/file/checkCaptcha.php", + # post={"check" : self.check, "recaptcha_challenge_field" : challenge, "recaptcha_response_field" : code})) + # if response['status'] == 'ok': + # self.correctCaptcha() + # break + # else: + # self.invalidCaptcha() + # else: + # self.fail("No valid captcha after 5 attempts") + # + # # This will take us to a wait screen + # waiturl = "http://www.filefactory.com" + response['path'] + # self.logDebug("Fetching wait with url [%s]" % waiturl) + # waithtml = self.load(waiturl, decode=True) + # found = re.search(r'<a href="(http://www.filefactory.com/dlf/.*?)"', waithtml) + # waithtml = self.load(found.group(1), decode=True) + # + # # Find the wait value and wait + # wait = int(re.search(self.WAIT_PATTERN, waithtml).group('wait')) + # self.logDebug("Waiting %d seconds." % wait) + # self.setWait(wait, True) + # self.wait() + # + # # Now get the real download url and retrieve the file + # url = re.search(self.FILE_URL_PATTERN,waithtml).group('url') + # # this may either download our file or forward us to an error page + # self.logDebug("Download URL: %s" % url) + self.download(direct) check = self.checkDownload({"multiple": "You are currently downloading too many files at once.", "error": '<div id="errorMessage">'}) -- cgit v1.2.3 From f516aaecff9d4efa8a60af521b4e1c1965a1a249 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Sun, 7 Apr 2013 22:31:51 +0200 Subject: FilefactoryCom: plugin rewritten (see also bug #70) --- module/plugins/hoster/FilefactoryCom.py | 218 +++++++++++++------------------- 1 file changed, 90 insertions(+), 128 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index b3eb4c865..e92c1505d 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -1,159 +1,121 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL -from module.plugins.Hoster import Hoster -from module.plugins.ReCaptcha import ReCaptcha -from module.utils import parseFileSize -from module.plugins.Plugin import chunks -from module.common.json_layer import json_loads -import re +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ # Test links (random.bin): # http://www.filefactory.com/file/ymxkmdud2o3/n/random.bin -def checkFile(plugin, urls): - url_dict = {} - +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.network.RequestFactory import getURL +from module.utils import parseFileSize + + +def getInfo(urls): + file_info = list() + list_ids = dict() + + # Create a dict id:url. Will be used to retrieve original url for url in urls: - url_dict[re.search(plugin.__pattern__, url).group('id')] = (url, 0, 0, url) - url_ids = url_dict.keys() - urls = map(lambda url_id: 'http://www.filefactory.com/file/' + url_id, url_ids) - - html = getURL("http://www.filefactory.com/tool/links.php", post = {"func": "links", "links": "\n".join(urls)}, decode=True) - - for m in re.finditer(plugin.LC_INFO_PATTERN, html): - if m.group('id') in url_ids: - url_dict[m.group('id')] = (m.group('name'), parseFileSize(m.group('size')), 2, url_dict[m.group('id')][3]) - - for m in re.finditer(plugin.LC_OFFLINE_PATTERN, html): - if m.group('id') in url_ids: - url_dict[m.group('id')] = (url_dict[m.group('id')][0], 0, 1, url_dict[m.group('id')][3]) - - file_info = url_dict.values() - + m = re.search(FilefactoryCom.__pattern__, url) + list_ids[m.group('id')] = url + + # WARN: There could be a limit of urls for request + post_data = {'func': 'links', 'links': '\n'.join(urls)} + rep = getURL('http://www.filefactory.com/tool/links.php', post=post_data, decode=True) + + # Online links + for m in re.finditer( + r'innerText">\s*<h1 class="name">(?P<N>.+) \((?P<S>[\w.]+) (?P<U>\w+)\)</h1>\s*<p>http://www.filefactory.com/file/(?P<ID>\w+).*</p>\s*<p class="hidden size">', + rep): + file_info.append((m.group('N'), parseFileSize(m.group('S'), m.group('U')), 2, list_ids[m.group('ID')])) + + # Offline links + for m in re.finditer( + r'innerText">\s*<h1>(http://www.filefactory.com/file/(?P<ID>\w+)/)</h1>\s*<p>\1</p>\s*<p class="errorResponse">Error: file not found</p>', + rep): + file_info.append((list_ids[m.group('ID')], 0, 1, list_ids[m.group('ID')])) + return file_info - -class FilefactoryCom(Hoster): + + +class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" - __pattern__ = r"http://(?:www\.)?filefactory\.com/file/(?P<id>[a-zA-Z0-9]+).*" # URLs given out are often longer but this is the requirement - __version__ = "0.37" + __pattern__ = r"https?://(?:www\.)?filefactory\.com/file/(?P<id>[a-zA-Z0-9]+)" + __version__ = "0.38" __description__ = """Filefactory.Com File Download Hoster""" - __author_name__ = ("paulking", "zoidberg") - - LC_INFO_PATTERN = r'<h1 class="name">(?P<name>[^<]+) \((?P<size>[0-9.]+ \w+)\)</h1>\s*<p>http://www.filefactory.com/file/(?P<id>\w+)/' - LC_OFFLINE_PATTERN = r'<p>http://www.filefactory.com/file/(?P<id>\w+)/</p>\s*<p class="errorResponse">' - + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + FILE_INFO_PATTERN = r'(?P<N>\S+)\s*</span>\s*</h1>\s*<h2>(?P<S>[\w.]+) (?P<U>\w+) file uploaded' FILE_OFFLINE_PATTERN = r'<title>File Not Found' - FILE_NAME_PATTERN = r'<span class="last">(?P<name>.*?)</span>' - FILE_INFO_PATTERN = r'<span>(?P<size>\d(\d|\.)*) (?P<units>..) file uploaded' - - FILE_CHECK_PATTERN = r'check:\s*\'(?P<check>.*?)\'' - CAPTCHA_KEY_PATTERN = r'Recaptcha.create\(\s*"(.*?)",' - WAIT_PATTERN = r'id="startWait" value="(?P<wait>\d+)"' - FILE_URL_PATTERN = r'<p[^>]*?id="downloadLinkTarget"[^>]*>\s*<a href="(?P<url>.*?)"' - - - def setup(self): - self.multiDL = self.resumeDownloads = self.premium def process(self, pyfile): - # Check file - pyfile.name, pyfile.size, status, self.url = checkFile(self, [pyfile.url])[0] - if status != 2: self.offline() - self.logDebug("File Name: %s Size: %d" % (pyfile.name, pyfile.size)) - - # Handle downloading - url = self.checkDirectDownload(pyfile.url) - if url: - self.download(url) - else: - self.html = self.load(pyfile.url, decode = True) - - if self.premium: - self.handlePremium() - else: - self.handleFree() - - def checkDirectDownload(self, url): - for i in range(5): - header = self.load(url, just_header = True) - if 'location' in header: - url = header['location'].strip() - if not url.startswith("http://"): - url = "http://www.filefactory.com" + url - self.logDebug('URL: ' + url) - elif 'content-disposition' in header: - return url - - return False - + if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()): + self.handlePremium() + else: + self.handleFree() + def handleFree(self): + self.html = self.load(self.pyfile.url, decode=True) if "Currently only Premium Members can download files larger than" in self.html: self.fail("File too large for free download") elif "All free download slots on this server are currently in use" in self.html: self.retry(50, 900, "All free slots are busy") - - url = re.search(r"document\.location\.host \+\s*'(.+)';", self.html).group(1) - if not url.startswith('"http://"'): - url = 'http://www.filefactory.com' + url + + url = re.search(r"document\.location\.host \+\s*'(.+)';", self.html) + if not url: + self.parseError('Unable to detect free link') + url = 'http://www.filefactory.com' + url.group(1) self.html = self.load(url, decode=True) - direct = re.search(r'data-href-direct="(.*)" class="button', self.html).group(1) - waittime = re.search(r'id="startWait" value="(\d+)"', self.html).group(1) - self.setWait(waittime) + waittime = re.search(r'id="startWait" value="(\d+)"', self.html) + if not waittime: + self.parseError('Unable to detect wait time') + self.setWait(int(waittime.group(1))) self.wait() - # # Resolve captcha - # found = re.search(self.CAPTCHA_KEY_PATTERN, self.html) - # recaptcha_key = found.group(1) if found else "6LeN8roSAAAAAPdC1zy399Qei4b1BwmSBSsBN8zm" - # recaptcha = ReCaptcha(self) - # - # # Try up to 5 times - # for i in range(5): - # challenge, code = recaptcha.challenge(recaptcha_key) - # response = json_loads(self.load("http://www.filefactory.com/file/checkCaptcha.php", - # post={"check" : self.check, "recaptcha_challenge_field" : challenge, "recaptcha_response_field" : code})) - # if response['status'] == 'ok': - # self.correctCaptcha() - # break - # else: - # self.invalidCaptcha() - # else: - # self.fail("No valid captcha after 5 attempts") - # - # # This will take us to a wait screen - # waiturl = "http://www.filefactory.com" + response['path'] - # self.logDebug("Fetching wait with url [%s]" % waiturl) - # waithtml = self.load(waiturl, decode=True) - # found = re.search(r'<a href="(http://www.filefactory.com/dlf/.*?)"', waithtml) - # waithtml = self.load(found.group(1), decode=True) - # - # # Find the wait value and wait - # wait = int(re.search(self.WAIT_PATTERN, waithtml).group('wait')) - # self.logDebug("Waiting %d seconds." % wait) - # self.setWait(wait, True) - # self.wait() - # - # # Now get the real download url and retrieve the file - # url = re.search(self.FILE_URL_PATTERN,waithtml).group('url') - # # this may either download our file or forward us to an error page - # self.logDebug("Download URL: %s" % url) - self.download(direct) - + direct = re.search(r'data-href-direct="(.*)" class="button', self.html) + if not direct: + self.parseError('Unable to detect free direct link') + direct = direct.group(1) + self.logDebug('DIRECT LINK: ' + direct) + self.download(direct, disposition=True) + check = self.checkDownload({"multiple": "You are currently downloading too many files at once.", "error": '<div id="errorMessage">'}) if check == "multiple": - self.setWait(15*60) self.logDebug("Parallel downloads detected; waiting 15 minutes") - self.wait() - self.retry() + self.retry(wait_time=15 * 60, reason='Parallel downloads') elif check == "error": self.fail("Unknown error") - + def handlePremium(self): - self.fail('Please enable direct downloads') - -def getInfo(urls): - for chunk in chunks(urls, 100): yield checkFile(FilefactoryCom, chunk) + header = self.load(self.pyfile.url, just_header=True) + if 'location' in header: + url = header['location'].strip() + if not url.startswith("http://"): + url = "http://www.filefactory.com" + url + elif 'content-disposition' in header: + url = self.pyfile.url + else: + self.parseError('Unable to detect premium direct link') + + self.logDebug('DIRECT PREMIUM LINK: ' + url) + self.download(url, disposition=True) -- cgit v1.2.3 From 7d4dbda910413ab5db4e689a3b73d83676cd1b23 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Mon, 8 Apr 2013 00:25:03 +0300 Subject: FilefactoryCom: removed unused constants + code comments --- module/plugins/hoster/FilefactoryCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index e92c1505d..aebf0f38d 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -57,14 +57,11 @@ class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" __pattern__ = r"https?://(?:www\.)?filefactory\.com/file/(?P<id>[a-zA-Z0-9]+)" - __version__ = "0.38" + __version__ = "0.39" __description__ = """Filefactory.Com File Download Hoster""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") - FILE_INFO_PATTERN = r'(?P<N>\S+)\s*</span>\s*</h1>\s*<h2>(?P<S>[\w.]+) (?P<U>\w+) file uploaded' - FILE_OFFLINE_PATTERN = r'<title>File Not Found' - def process(self, pyfile): if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()): self.handlePremium() @@ -78,18 +75,21 @@ class FilefactoryCom(SimpleHoster): elif "All free download slots on this server are currently in use" in self.html: self.retry(50, 900, "All free slots are busy") + # Load the page that contains the direct link url = re.search(r"document\.location\.host \+\s*'(.+)';", self.html) if not url: self.parseError('Unable to detect free link') url = 'http://www.filefactory.com' + url.group(1) self.html = self.load(url, decode=True) + # Free downloads wait time waittime = re.search(r'id="startWait" value="(\d+)"', self.html) if not waittime: self.parseError('Unable to detect wait time') self.setWait(int(waittime.group(1))) self.wait() + # Parse the direct link and download it direct = re.search(r'data-href-direct="(.*)" class="button', self.html) if not direct: self.parseError('Unable to detect free direct link') -- cgit v1.2.3 From adc259b69f1b283c92cfcb759fffc05d777a309a Mon Sep 17 00:00:00 2001 From: philou75 <pjupin@gmail.com> Date: Mon, 8 Apr 2013 23:00:02 +0300 Subject: Update OneFichierCom.py Waiting pattern correction following hoster modification --- module/plugins/hoster/OneFichierCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 7b87bbe71..5d7e14f1e 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -19,7 +19,7 @@ class OneFichierCom(SimpleHoster): DOWNLOAD_LINK_PATTERN = r'<br/> <br/> <br/> \s+<a href="(?P<url>http://.*?)"' PASSWORD_PROTECTED_TOKEN = "protected by password" - WAITING_PATTERN = "Warning ! Without premium status, you can download only one file at a time and you must wait at least (\d+) minutes between each downloads." + WAITING_PATTERN = "Warning ! Without premium status, you can download only one file at a time and you must wait up to (\d+) minutes between each downloads." def process(self, pyfile): found = re.search(self.__pattern__, pyfile.url) file_id = found.group(2) -- cgit v1.2.3 From 0da85ec20db476531f66320123432c41d1df1c01 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Mon, 8 Apr 2013 23:27:57 +0200 Subject: DownloadScheduler: ability to abort downloads http://forum.pyload.org/viewtopic.php?f=7&t=2403 --- module/plugins/hooks/DownloadScheduler.py | 72 +++++++++++++++++-------------- 1 file changed, 40 insertions(+), 32 deletions(-) (limited to 'module') diff --git a/module/plugins/hooks/DownloadScheduler.py b/module/plugins/hooks/DownloadScheduler.py index 7cadede38..4049d71c5 100644 --- a/module/plugins/hooks/DownloadScheduler.py +++ b/module/plugins/hooks/DownloadScheduler.py @@ -18,61 +18,69 @@ import re from time import localtime + from module.plugins.Hook import Hook + class DownloadScheduler(Hook): __name__ = "DownloadScheduler" - __version__ = "0.20" + __version__ = "0.21" __description__ = """Download Scheduler""" - __config__ = [("activated", "bool", "Activated", "False"), - ("timetable", "str", "List time periods as hh:mm full or number(kB/s)", "0:00 full, 7:00 250, 10:00 0, 17:00 150")] - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") - + __config__ = [("activated", "bool", "Activated", "False"), + ("timetable", "str", "List time periods as hh:mm full or number(kB/s)", + "0:00 full, 7:00 250, 10:00 0, 17:00 150"), + ("abort", "bool", "Abort active downloads when start period with speed 0", "False")] + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + def setup(self): - self.cb = None # callback to scheduler job; will be by removed hookmanager when hook unloaded - + self.cb = None # callback to scheduler job; will be by removed hookmanager when hook unloaded + def coreReady(self): self.updateSchedule() - - def updateSchedule(self, schedule = None): - if schedule is None: - schedule = self.getConfig("timetable") - - schedule = re.findall("(\d{1,2}):(\d{2})[\s]*(-?\d+)", schedule.lower().replace("full", "-1").replace("none", "0")) + + def updateSchedule(self, schedule=None): + if schedule is None: + schedule = self.getConfig("timetable") + + schedule = re.findall("(\d{1,2}):(\d{2})[\s]*(-?\d+)", + schedule.lower().replace("full", "-1").replace("none", "0")) if not schedule: self.logError("Invalid schedule") return - + t0 = localtime() now = (t0.tm_hour, t0.tm_min, t0.tm_sec, "X") schedule = sorted([(int(x[0]), int(x[1]), 0, int(x[2])) for x in schedule] + [now]) - - self.logDebug("Schedule", schedule) - + + self.logDebug("Schedule", schedule) + for i, v in enumerate(schedule): if v[3] == "X": - last, next = schedule[i-1], schedule[(i+1) % len(schedule)] + last, next = schedule[i - 1], schedule[(i + 1) % len(schedule)] self.logDebug("Now/Last/Next", now, last, next) - - self.setDownloadSpeed(last[3]) - - next_time = (((24 + next[0] - now[0])* 60 + next[1] - now[1]) * 60 + next[2] - now[2]) % 86400 + + self.setDownloadSpeed(last[3]) + + next_time = (((24 + next[0] - now[0]) * 60 + next[1] - now[1]) * 60 + next[2] - now[2]) % 86400 self.core.scheduler.removeJob(self.cb) - self.cb = self.core.scheduler.addJob(next_time, self.updateSchedule, threaded=False) - - def setDownloadSpeed(self, speed): + self.cb = self.core.scheduler.addJob(next_time, self.updateSchedule, threaded=False) + + def setDownloadSpeed(self, speed): if speed == 0: - self.logInfo("Stopping download server. (Running downloads will not be aborted.)") + abort = self.getConfig("abort") + self.logInfo("Stopping download server. (Running downloads will %sbe aborted.)" % ('' if abort else 'not ')) self.core.api.pauseServer() + if abort: + self.core.api.stopAllDownloads() else: self.core.api.unpauseServer() - + if speed > 0: self.logInfo("Setting download speed to %d kB/s" % speed) - self.core.api.setConfigValue("download","limit_speed",1) - self.core.api.setConfigValue("download","max_speed",speed) + self.core.api.setConfigValue("download", "limit_speed", 1) + self.core.api.setConfigValue("download", "max_speed", speed) else: self.logInfo("Setting download speed to FULL") - self.core.api.setConfigValue("download","limit_speed",0) - self.core.api.setConfigValue("download","max_speed",-1) \ No newline at end of file + self.core.api.setConfigValue("download", "limit_speed", 0) + self.core.api.setConfigValue("download", "max_speed", -1) -- cgit v1.2.3 From 7a2980d939b64e20c2c3ec5891dae2afcce550d0 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Tue, 9 Apr 2013 20:46:39 +0200 Subject: UploadedTo: getID uses the __pattern__ regex to avoid duplication. + test links + https support + content-disposition --- module/plugins/hoster/UploadedTo.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 874b04d64..c7ce5846e 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Test links (random.bin): +# http://ul.to/044yug9o +# http://ul.to/gzfhd0xs + import re from module.utils import html_unescape, parseFileSize @@ -14,7 +18,7 @@ key = "bGhGMkllZXByd2VEZnU5Y2NXbHhYVlZ5cEE1bkEzRUw=".decode('base64') def getID(url): """ returns id from file url""" - m = re.match(r"http://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)", url) + m = re.match(UploadedTo.__pattern__, url) return m.group('ID') @@ -77,8 +81,8 @@ def getInfo(urls): class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" - __pattern__ = r"http://[\w\.-]*?(uploaded\.(to|net)(/file/|/?\?id=|.*?&id=)|ul\.to/)\w+" - __version__ = "0.66" + __pattern__ = r"https?://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)" + __version__ = "0.67" __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") @@ -221,7 +225,7 @@ class UploadedTo(Hoster): if not downloadURL: self.fail("No Download url retrieved/all captcha attempts failed") - self.download(downloadURL) + self.download(downloadURL, disposition=True) check = self.checkDownload({"limit-dl": self.DL_LIMIT_PATTERN}) if check == "limit-dl": self.setWait(60 * 60, True) -- cgit v1.2.3 From 95f56ae40b7c6a56b959b512aa82c8674377c31c Mon Sep 17 00:00:00 2001 From: Gonzalo SR <gonzalo@gonzalosr.com> Date: Thu, 11 Apr 2013 15:16:13 +0300 Subject: Fixed incorrect use of rstrip() rstrip() ate the last "r" in .rar files. "The chars argument is not a suffix; rather, all combinations of its values are stripped" (see http://docs.python.org/2/library/stdtypes.html#str.rstrip) Using rsplit() instead. --- module/plugins/hoster/MegaNz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/MegaNz.py b/module/plugins/hoster/MegaNz.py index a28ddca9d..3b64c3ef5 100644 --- a/module/plugins/hoster/MegaNz.py +++ b/module/plugins/hoster/MegaNz.py @@ -19,7 +19,7 @@ class MegaNz(Hoster): __name__ = "MegaNz" __type__ = "hoster" __pattern__ = r"https?://([a-z0-9]+\.)?mega\.co\.nz/#!([a-zA-Z0-9!_\-]+)" - __version__ = "0.11" + __version__ = "0.12" __description__ = """mega.co.nz hoster plugin""" __author_name__ = ("RaNaN", ) __author_mail__ = ("ranan@pyload.org", ) @@ -34,7 +34,7 @@ class MegaNz(Hoster): def getCipherKey(self, key): """ Construct the cipher key from the given data """ a = array("I", key) - key_array = array("I", [a[0] ^ a[4], a[1] ^a[5], a[2] ^ a[6], a[3] ^a[7]]) + key_array = array("I", [a[0] ^ a[4], a[1] ^ a[5], a[2] ^ a[6], a[3] ^ a[7]]) return key_array def callApi(self, **kwargs): @@ -55,7 +55,7 @@ class MegaNz(Hoster): self.fail(_("Decryption failed")) # Data is padded, 0-bytes must be stripped - return json.loads(attr.replace("MEGA", "").rstrip("\0").strip()) + return json.loads(attr.replace("MEGA", "").rsplit("\0")[0].strip()) def decryptFile(self, key): """ Decrypts the file at lastDownload` """ @@ -69,7 +69,7 @@ class MegaNz(Hoster): self.pyfile.setStatus("decrypting") f = open(self.lastDownload, "rb") - df = open(self.lastDownload.rstrip(self.FILE_SUFFIX), "wb") + df = open(self.lastDownload.rsplit(self.FILE_SUFFIX)[0], "wb") # TODO: calculate CBC-MAC for checksum -- cgit v1.2.3 From 2f9dc56db6fc84e9915b7b8bc7892b880fe03059 Mon Sep 17 00:00:00 2001 From: Gonzalo SR <gonzalo@gonzalosr.com> Date: Thu, 11 Apr 2013 19:07:46 +0300 Subject: revert correct rsrtrip() --- module/plugins/hoster/MegaNz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/hoster/MegaNz.py b/module/plugins/hoster/MegaNz.py index 3b64c3ef5..e5be4eeb7 100644 --- a/module/plugins/hoster/MegaNz.py +++ b/module/plugins/hoster/MegaNz.py @@ -55,7 +55,7 @@ class MegaNz(Hoster): self.fail(_("Decryption failed")) # Data is padded, 0-bytes must be stripped - return json.loads(attr.replace("MEGA", "").rsplit("\0")[0].strip()) + return json.loads(attr.replace("MEGA", "").rstrip("\0").strip()) def decryptFile(self, key): """ Decrypts the file at lastDownload` """ -- cgit v1.2.3 From 3b86e3ee0b31bb4b32caa2ac3c2a543b00d290aa Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Fri, 12 Apr 2013 15:20:09 +0200 Subject: EgoFilesCom: fixed FILE_INFO_PATTERN --- module/plugins/hoster/EgoFilesCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index ad278e60f..4e78a5b9a 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -28,12 +28,12 @@ class EgoFilesCom(SimpleHoster): __name__ = "EgoFilesCom" __type__ = "hoster" __pattern__ = r"https?://(www\.)?egofiles.com/(\w+)" - __version__ = "0.11" + __version__ = "0.12" __description__ = """Egofiles.com Download Hoster""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") - FILE_INFO_PATTERN = r'<div class="down-file">\s+(?P<N>\S+)\s+<div class="file-properties">\s+(File size|Rozmiar): (?P<S>[\w.]+) (?P<U>\w+) \|' + FILE_INFO_PATTERN = r'<div class="down-file">\s+(?P<N>.+)\s+<div class="file-properties">\s+(File size|Rozmiar): (?P<S>[\w.]+) (?P<U>\w+) \|' FILE_OFFLINE_PATTERN = r'(File size|Rozmiar): 0 KB' WAIT_TIME_PATTERN = r'For next free download you have to wait <strong>((?P<m>\d*)m)? ?((?P<s>\d+)s)?</strong>' DIRECT_LINK_PATTERN = r'<a href="(?P<link>[^"]+)">Download ></a>' -- cgit v1.2.3 From f68b64367ea0bca12318fcf96208879872cd91a7 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Fri, 12 Apr 2013 15:27:21 +0200 Subject: New crypter: MBLinkInfo --- module/plugins/crypter/MBLinkInfo.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 module/plugins/crypter/MBLinkInfo.py (limited to 'module') diff --git a/module/plugins/crypter/MBLinkInfo.py b/module/plugins/crypter/MBLinkInfo.py new file mode 100644 index 000000000..0c0359ed9 --- /dev/null +++ b/module/plugins/crypter/MBLinkInfo.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.Crypter import Crypter + + +class MBLinkInfo(Crypter): + __name__ = "MBLinkInfo" + __type__ = "container" + __pattern__ = r"http://(?:www\.)?mblink\.info/\?id=(\d+)" + __version__ = "0.01" + __description__ = """MBLink.Info Container Plugin""" + __author_name__ = ("Gummibaer", "stickell") + __author_mail__ = ("Gummibaer@wiki-bierkiste.de", "l.stickell@yahoo.it") + + URL_PATTERN = r'<meta[^;]+; URL=(.*)["\']>' + + def decrypt(self, pyfile): + src = self.load(pyfile.url) + found = re.search(self.URL_PATTERN, src) + if found: + link = found.group(1) + self.logDebug("Redirected to " + link) + self.core.files.addLinks([link], self.pyfile.package().id) + else: + self.fail('Unable to detect valid link') -- cgit v1.2.3 From c235e869a50d8783b01f5a46d5b93e171cbbb71e Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Fri, 12 Apr 2013 15:30:17 +0200 Subject: New debrid: MultiDebridCom http://forum.pyload.org/viewtopic.php?f=13&t=2426 --- module/plugins/accounts/MultiDebridCom.py | 47 +++++++++++++++++++++++++ module/plugins/hooks/MultiDebridCom.py | 42 +++++++++++++++++++++++ module/plugins/hoster/MultiDebridCom.py | 57 +++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 module/plugins/accounts/MultiDebridCom.py create mode 100644 module/plugins/hooks/MultiDebridCom.py create mode 100644 module/plugins/hoster/MultiDebridCom.py (limited to 'module') diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py new file mode 100644 index 000000000..904be5ee7 --- /dev/null +++ b/module/plugins/accounts/MultiDebridCom.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- + +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ + +from time import time + +from module.plugins.Account import Account +from module.common.json_layer import json_loads + + +class MultiDebridCom(Account): + __name__ = "MultiDebridCom" + __version__ = "0.01" + __type__ = "account" + __description__ = """Multi-debrid.com account plugin""" + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + def loadAccountInfo(self, user, req): + if 'days_left' in self.json_data: + validuntil = int(time() + self.json_data['days_left'] * 86400) + return {"premium": True, "validuntil": validuntil, "trafficleft": -1} + else: + self.logError('Unable to get account information') + + def login(self, user, data, req): + # Password to use is the API-Password written in http://multi-debrid.com/myaccount + self.html = req.load("http://multi-debrid.com/api.php", + get={"user": user, "pass": data["password"]}) + self.logDebug('JSON data: ' + self.html) + self.json_data = json_loads(self.html) + if self.json_data['status'] != 'ok': + self.logError('Invalid login. The password to use is the API-Password you find in your "My Account" page') + self.wrongPassword() diff --git a/module/plugins/hooks/MultiDebridCom.py b/module/plugins/hooks/MultiDebridCom.py new file mode 100644 index 000000000..c95138648 --- /dev/null +++ b/module/plugins/hooks/MultiDebridCom.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ + +from module.plugins.internal.MultiHoster import MultiHoster +from module.network.RequestFactory import getURL +from module.common.json_layer import json_loads + + +class MultiDebridCom(MultiHoster): + __name__ = "MultiDebridCom" + __version__ = "0.01" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", "False"), + ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("hosterList", "str", "Hoster list (comma separated)", ""), + ("unloadFailing", "bool", "Revert to standard download if download fails", "False"), + ("interval", "int", "Reload interval in hours (0 to disable)", "24")] + + __description__ = """Multi-debrid.com hook plugin""" + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + def getHoster(self): + json_data = getURL('http://multi-debrid.com/api.php?hosts', decode=True) + self.logDebug('JSON data: ' + json_data) + json_data = json_loads(json_data) + + return json_data['hosts'] diff --git a/module/plugins/hoster/MultiDebridCom.py b/module/plugins/hoster/MultiDebridCom.py new file mode 100644 index 000000000..ca98e8a0e --- /dev/null +++ b/module/plugins/hoster/MultiDebridCom.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ + +import re + +from module.plugins.Hoster import Hoster +from module.common.json_layer import json_loads + + +class MultiDebridCom(Hoster): + __name__ = "MultiDebridCom" + __version__ = "0.01" + __type__ = "hoster" + __pattern__ = r"http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/" + __description__ = """Multi-debrid.com hoster plugin""" + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + def init(self): + self.chunkLimit = -1 + self.resumeDownload = True + + def process(self, pyfile): + if not self.account: + self.logError("Please enter your Multi-debrid.com account or deactivate this plugin") + self.fail("No Multi-debrid.com account provided") + + self.logDebug("Original URL: %s" % pyfile.url) + if re.match(self.__pattern__, pyfile.url): + new_url = pyfile.url + else: + page = self.req.load('http://multi-debrid.com/api.php', + get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], + 'link': pyfile.url}) + self.logDebug("JSON data: " + page) + page = json_loads(page) + if page['status'] != 'ok': + self.fail('Unable to unrestrict link') + new_url = page['link'] + + self.logDebug("Unrestricted URL: " + new_url) + + self.download(new_url, disposition=True) -- cgit v1.2.3 From 6ea6cc0386ddb9de702b02b38ea10ff2f1e7b5cc Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Fri, 12 Apr 2013 19:23:43 +0300 Subject: MBLinkInfo: updated pattern http://forum.pyload.org/viewtopic.php?p=8957#p8957 --- module/plugins/crypter/MBLinkInfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/MBLinkInfo.py b/module/plugins/crypter/MBLinkInfo.py index 0c0359ed9..e266c7722 100644 --- a/module/plugins/crypter/MBLinkInfo.py +++ b/module/plugins/crypter/MBLinkInfo.py @@ -8,8 +8,8 @@ from module.plugins.Crypter import Crypter class MBLinkInfo(Crypter): __name__ = "MBLinkInfo" __type__ = "container" - __pattern__ = r"http://(?:www\.)?mblink\.info/\?id=(\d+)" - __version__ = "0.01" + __pattern__ = r"http://(?:www\.)?mblink\.info/?\?id=(\d+)" + __version__ = "0.02" __description__ = """MBLink.Info Container Plugin""" __author_name__ = ("Gummibaer", "stickell") __author_mail__ = ("Gummibaer@wiki-bierkiste.de", "l.stickell@yahoo.it") -- cgit v1.2.3 From 6c77bea330e4e71c52017d108dd23528ca081d10 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Sat, 13 Apr 2013 20:52:10 +0200 Subject: Fixed regular expression and optimized quality report. --- module/plugins/crypter/Movie2kTo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index e0e923abb..4a8d21615 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -14,7 +14,7 @@ class Movie2kTo(Crypter): ('dir_quality', 'bool', 'Show the quality of the footage in the folder name', 'True'), ('whole_season', 'bool', 'Download whole season', 'False'), ('everything', 'bool', 'Download everything', 'False'), - ('firstN', 'int', 'Download the first N files for each episode. The first file is probably all you will need.', '1')] + ('firstN', 'int', 'Download the first N files for each episode (the first file is probably all you will need)', '1')] __description__ = """Movie2k.to Container Plugin""" __author_name__ = ('4Christopher') __author_mail__ = ('4Christopher@gmx.de') @@ -60,6 +60,7 @@ class Movie2kTo(Crypter): def qStat(self): if len(self.q) == 0: return '' if not self.getConfig('dir_quality'): return '' + if len(self.q) == 1: return (' (Quality: %d, max (all hosters): %d)' % (self.q[0], self.max_q)) return (' (Average quality: %d, min: %d, max: %d, %s, max (all hosters): %d)' % (sum(self.q) / float(len(self.q)), min(self.q), max(self.q), self.q, self.max_q)) def qStatReset(self): @@ -132,7 +133,7 @@ class Movie2kTo(Crypter): else: self.logDebug('This is already the right ID') try: - url = re.search(r'<a target="_blank" href="(http://.*?)"', self.html).group(1) + url = re.search(r'<a target="_blank" href="(http://[^"]*?)"', self.html).group(1) self.logDebug('id: %s, %s: %s' % (h_id, hoster, url)) links.append(url) except: -- cgit v1.2.3 From 30d8a820de43c021e652b55e3b52228fb04f515d Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Sat, 13 Apr 2013 21:05:54 +0200 Subject: Cleanup. --- module/plugins/crypter/Movie2kTo.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index 4a8d21615..b0b4085a2 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -63,9 +63,11 @@ class Movie2kTo(Crypter): if len(self.q) == 1: return (' (Quality: %d, max (all hosters): %d)' % (self.q[0], self.max_q)) return (' (Average quality: %d, min: %d, max: %d, %s, max (all hosters): %d)' % (sum(self.q) / float(len(self.q)), min(self.q), max(self.q), self.q, self.max_q)) + def qStatReset(self): - self.q = [] ## to calculate the average, min and max of the quality - self.max_q = None + self.q = [] ## to calculate the average, min and max of the quality + self.max_q = None ## maximum quality of all hosters + def tvshow_number(self, number): if int(number) < 10: return '0%s' % number @@ -85,8 +87,6 @@ class Movie2kTo(Crypter): elif re.search(self.FILM_URL_PATH_PATTERN, self.url_path): self.format = 'film' pattern_re = re.search(self.FILM_URL_PATH_PATTERN, self.url_path) - - self.name = pattern_re.group('name') self.id = pattern_re.group('id') self.logDebug('URL Path: %s (ID: %s, Name: %s, Format: %s)' @@ -104,8 +104,8 @@ class Movie2kTo(Crypter): re_quality = re.compile(r'.+?Quality:.+?smileys/(\d)\.gif') ## The quality is one digit. 0 is the worst and 5 is the best. ## Is not always there … - re_hoster_id_html = re.compile(r'(?:<td height|<tr id).+?<a href=".*?(\d{7}).*?".+? ([^<>]+?)</a>(.+?)</tr>') re_hoster_id_js = re.compile(r'links\[(\d+?)\].+ (.+?)</a>(.+?)</tr>') + re_hoster_id_html = re.compile(r'(?:<td height|<tr id).+?<a href=".*?(\d{7}).*?".+? ([^<>]+?)</a>(.+?)</tr>') ## I assume that the ID is 7 digits longs count = defaultdict(int) matches = re_hoster_id_html.findall(self.html) @@ -116,10 +116,10 @@ class Movie2kTo(Crypter): match_q = re_quality.search(q_html) if match_q: quality = int(match_q.group(1)) - if self.max_q: - if self.max_q < quality: self.max_q = quality - else: ## was None before + if self.max_q == None: self.max_q = quality + else: + if self.max_q < quality: self.max_q = quality q_s = ', Quality: %d' % quality else: q_s = ', unknown quality' @@ -140,6 +140,5 @@ class Movie2kTo(Crypter): self.logDebug('Failed to find the URL') else: self.logDebug('Not accepted: %s, ID: %s%s' % (hoster, h_id, q_s)) - # self.logDebug(links) return links -- cgit v1.2.3 From ba64df181e8f26b5246e6eb26843e69080984227 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Sat, 13 Apr 2013 21:19:27 +0200 Subject: Added Putlocker to the list of accepted hosters. --- module/plugins/crypter/Movie2kTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index b0b4085a2..f2c5ece55 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -10,7 +10,7 @@ class Movie2kTo(Crypter): __type__ = 'container' __pattern__ = r'http://(?:www\.)?movie2k\.to/(.*)\.html' __version__ = '0.4' - __config__ = [('accepted_hosters', 'str', 'List of accepted hosters', 'Xvidstage, '), + __config__ = [('accepted_hosters', 'str', 'List of accepted hosters', 'Xvidstage, Putlocker, '), ('dir_quality', 'bool', 'Show the quality of the footage in the folder name', 'True'), ('whole_season', 'bool', 'Download whole season', 'False'), ('everything', 'bool', 'Download everything', 'False'), -- cgit v1.2.3 From 4403f97651be9a3e178377ce38fed14b9b7d7c32 Mon Sep 17 00:00:00 2001 From: healthhazard <healthhazard@freenet.de> Date: Sun, 14 Apr 2013 13:25:24 +0300 Subject: Update UploadedTo.py Corrected waiting time to 180 (not 60) minutes as free user. --- module/plugins/hoster/UploadedTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index c7ce5846e..8c7cb5b0a 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -209,7 +209,7 @@ class UploadedTo(Hoster): elif "limit-parallel" in result: self.fail("Cannot download in parallel") elif self.DL_LIMIT_PATTERN in result: # limit-dl - self.setWait(60 * 60, True) + self.setWait(3 * 60 * 60, True) self.wait() self.retry() elif 'err:"captcha"' in result: @@ -228,6 +228,6 @@ class UploadedTo(Hoster): self.download(downloadURL, disposition=True) check = self.checkDownload({"limit-dl": self.DL_LIMIT_PATTERN}) if check == "limit-dl": - self.setWait(60 * 60, True) + self.setWait(3 * 60 * 60, True) self.wait() self.retry() -- cgit v1.2.3 From b300710f168ae820df20ef63f8b4436a050373a4 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Sun, 14 Apr 2013 13:03:37 +0200 Subject: Wrote DownloadVimeoCom. The website is used to get the download URL from Vimeo.com, Smotri.com, and Dailymotion.com. --- module/plugins/crypter/DownloadVimeoCom.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 module/plugins/crypter/DownloadVimeoCom.py (limited to 'module') diff --git a/module/plugins/crypter/DownloadVimeoCom.py b/module/plugins/crypter/DownloadVimeoCom.py new file mode 100644 index 000000000..0615fa835 --- /dev/null +++ b/module/plugins/crypter/DownloadVimeoCom.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re +import HTMLParser +from module.plugins.Crypter import Crypter + +class DownloadVimeoCom(Crypter): + __name__ = 'DownloadVimeoCom' + __type__ = 'crypter' + __pattern__ = r'(?:http://vimeo.com/\d*?|http://smotri.com/video/view/?id=.*|http://www.dailymotion.com/video/.*)' + ## The download from dailymotion failed with a 403 + __version__ = '0.1' + __description__ = """Video Download Plugin based on downloadvimeo.com""" + __author_name__ = ('4Christopher') + __author_mail__ = ('4Christopher@gmx.de') + BASE_URL = 'http://downloadvimeo.com' + + def decrypt(self, pyfile): + self.package = pyfile.package() + html = self.load('%s/generate?url=%s' % (self.BASE_URL, pyfile.url)) + h = HTMLParser.HTMLParser() + try: + f = re.search(r'cmd quality="(?P<quality>[^"]+?)">\s*?(?P<URL>[^<]*?)</cmd>', html) + except: + self.logDebug('Failed to find the URL') + else: + url = h.unescape(f.group('URL')) + self.logDebug('Quality: %s, URL: %s' % (f.group('quality'), url)) + self.packages.append((self.package.name, [url], self.package.folder)) -- cgit v1.2.3 From ef99c19aa5285ad5ad54aec867135b325da6acd0 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Sun, 14 Apr 2013 16:04:44 +0300 Subject: UploadedTo: version increased after #83 --- module/plugins/hoster/UploadedTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 8c7cb5b0a..5855f118c 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -82,7 +82,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.67" + __version__ = "0.68" __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") -- cgit v1.2.3 From 61e46c72852b9c6ed9fc8735d1603adb95a49ba5 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Sun, 14 Apr 2013 15:11:03 +0200 Subject: DownloadVimeoCom: removed pattern for Dailymotion.com There is already a plugin for Dailymotion.com. --- module/plugins/crypter/DownloadVimeoCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/DownloadVimeoCom.py b/module/plugins/crypter/DownloadVimeoCom.py index 0615fa835..7e76a90ed 100644 --- a/module/plugins/crypter/DownloadVimeoCom.py +++ b/module/plugins/crypter/DownloadVimeoCom.py @@ -8,7 +8,7 @@ from module.plugins.Crypter import Crypter class DownloadVimeoCom(Crypter): __name__ = 'DownloadVimeoCom' __type__ = 'crypter' - __pattern__ = r'(?:http://vimeo.com/\d*?|http://smotri.com/video/view/?id=.*|http://www.dailymotion.com/video/.*)' + __pattern__ = r'(?:http://vimeo.com/\d*?|http://smotri.com/video/view/?id=.*)' ## The download from dailymotion failed with a 403 __version__ = '0.1' __description__ = """Video Download Plugin based on downloadvimeo.com""" -- cgit v1.2.3 From f2a215b81cc579514fa1850f18a03d73a87eb3b0 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Sun, 14 Apr 2013 21:05:36 +0200 Subject: ExtabitCom: fixed #77 --- module/plugins/hoster/ExtabitCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index 718423986..702cfe2bc 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -24,8 +24,8 @@ from module.common.json_layer import json_loads class ExtabitCom(SimpleHoster): __name__ = "ExtabitCom" __type__ = "hoster" - __pattern__ = r"http://(\w+\.)*extabit\.com/(file|go)/(?P<ID>\w+)" - __version__ = "0.2" + __pattern__ = r"http://(\w+\.)*extabit\.com/(file|go|fid)/(?P<ID>\w+)" + __version__ = "0.3" __description__ = """Extabit.com""" __author_name__ = ("zoidberg") -- cgit v1.2.3 From 1211334dd71aa705d733475e74ea0d27e949a7c4 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Sun, 14 Apr 2013 21:07:10 +0200 Subject: ExtabitCom: cosmetics --- module/plugins/hoster/ExtabitCom.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index 702cfe2bc..fd91bb023 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -17,10 +17,12 @@ """ import re + from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.plugins.ReCaptcha import ReCaptcha from module.common.json_layer import json_loads + class ExtabitCom(SimpleHoster): __name__ = "ExtabitCom" __type__ = "hoster" @@ -33,34 +35,34 @@ class ExtabitCom(SimpleHoster): FILE_SIZE_PATTERN = r'<th>Size:</th>\s*<td class="col-fileinfo">(?P<S>[^<]+)</td>' FILE_OFFLINE_PATTERN = r'<h1>File not found</h1>' TEMP_OFFLINE_PATTERN = r">(File is temporary unavailable|No download mirror)<" - + DOWNLOAD_LINK_PATTERN = r'"(http://guest\d+\.extabit\.com/[a-z0-9]+/.*?)"' - def handleFree(self): + def handleFree(self): if r">Only premium users can download this file" in self.html: self.fail("Only premium users can download this file") - + m = re.search(r"Next free download from your ip will be available in <b>(\d+)\s*minutes", self.html) if m: self.setWait(int(m.group(1)) * 60, True) - self.wait() + self.wait() elif "The daily downloads limit from your IP is exceeded" in self.html: self.setWait(3600, True) self.wait() - + self.logDebug("URL: " + self.req.http.lastEffectiveURL) m = re.match(self.__pattern__, self.req.http.lastEffectiveURL) - fileID = m.group('ID') if m else self.file_info('ID') - + fileID = m.group('ID') if m else self.file_info('ID') + m = re.search(r'recaptcha/api/challenge\?k=(\w+)', self.html) if m: recaptcha = ReCaptcha(self) captcha_key = m.group(1) - + for i in range(5): get_data = {"type": "recaptcha"} get_data["challenge"], get_data["capture"] = recaptcha.challenge(captcha_key) - response = json_loads(self.load("http://extabit.com/file/%s/" % fileID, get = get_data)) + response = json_loads(self.load("http://extabit.com/file/%s/" % fileID, get=get_data)) if "ok" in response: self.correctCaptcha() break @@ -70,15 +72,16 @@ class ExtabitCom(SimpleHoster): self.fail("Invalid captcha") else: self.parseError('Captcha') - + if not "href" in response: self.parseError('JSON') - + self.html = self.load("http://extabit.com/file/%s%s" % (fileID, response['href'])) m = re.search(self.DOWNLOAD_LINK_PATTERN, self.html) if not m: self.parseError('Download URL') url = m.group(1) self.logDebug("Download URL: " + url) - self.download(url) + self.download(url) + -getInfo = create_getInfo(ExtabitCom) \ No newline at end of file +getInfo = create_getInfo(ExtabitCom) -- cgit v1.2.3 From 63b5b8b4aac285be9e11302535ca805040522167 Mon Sep 17 00:00:00 2001 From: Richard Schwab <mail@w.tf-w.tf> Date: Sun, 7 Apr 2013 01:47:20 +0200 Subject: Removing MegaUploadCom leftovers --- module/plugins/crypter/SerienjunkiesOrg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/SerienjunkiesOrg.py b/module/plugins/crypter/SerienjunkiesOrg.py index dfe34ff6e..5cf2454c1 100644 --- a/module/plugins/crypter/SerienjunkiesOrg.py +++ b/module/plugins/crypter/SerienjunkiesOrg.py @@ -17,7 +17,7 @@ class SerienjunkiesOrg(Crypter): ("changeNameDJ", "Packagename;Show;Format;Episode", "Take DJ.org name", "Show"), ("randomPreferred", "bool", "Randomize Preferred-List", False), ("hosterListMode", "OnlyOne;OnlyPreferred(One);OnlyPreferred(All);All", "Use for hosters (if supported)", "All"), - ("hosterList", "str", "Preferred Hoster list (comma separated)", "RapidshareCom,UploadedTo,NetloadIn,FilefactoryCom,FreakshareNet,FilebaseTo,MegauploadCom,HotfileCom,DepositfilesCom,EasyshareCom,KickloadCom"), + ("hosterList", "str", "Preferred Hoster list (comma separated)", "RapidshareCom,UploadedTo,NetloadIn,FilefactoryCom,FreakshareNet,FilebaseTo,HotfileCom,DepositfilesCom,EasyshareCom,KickloadCom"), ("ignoreList", "str", "Ignored Hoster list (comma separated)", "MegauploadCom") ] __description__ = """serienjunkies.org Container Plugin""" -- cgit v1.2.3 From b1ee282d4f63ed76ea7fa0e37e61d17b0909ba78 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Mon, 15 Apr 2013 14:15:26 +0300 Subject: SerienjunkiesOrg: increased version after #85 --- module/plugins/crypter/SerienjunkiesOrg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/SerienjunkiesOrg.py b/module/plugins/crypter/SerienjunkiesOrg.py index 5cf2454c1..0506d90fb 100644 --- a/module/plugins/crypter/SerienjunkiesOrg.py +++ b/module/plugins/crypter/SerienjunkiesOrg.py @@ -11,7 +11,7 @@ class SerienjunkiesOrg(Crypter): __name__ = "SerienjunkiesOrg" __type__ = "container" __pattern__ = r"http://.*?(serienjunkies.org|dokujunkies.org)/.*?" - __version__ = "0.36" + __version__ = "0.37" __config__ = [ ("changeNameSJ", "Packagename;Show;Season;Format;Episode", "Take SJ.org name", "Show"), ("changeNameDJ", "Packagename;Show;Format;Episode", "Take DJ.org name", "Show"), -- cgit v1.2.3 From 5e114ee4341db4bd664beb676fff34a1deecd164 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Mon, 15 Apr 2013 17:42:35 +0200 Subject: DownloadVimeoCom: Fixed regular expression. --- module/plugins/crypter/DownloadVimeoCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/DownloadVimeoCom.py b/module/plugins/crypter/DownloadVimeoCom.py index 7e76a90ed..88310915b 100644 --- a/module/plugins/crypter/DownloadVimeoCom.py +++ b/module/plugins/crypter/DownloadVimeoCom.py @@ -8,7 +8,7 @@ from module.plugins.Crypter import Crypter class DownloadVimeoCom(Crypter): __name__ = 'DownloadVimeoCom' __type__ = 'crypter' - __pattern__ = r'(?:http://vimeo.com/\d*?|http://smotri.com/video/view/?id=.*)' + __pattern__ = r'(?:http://vimeo\.com/\d*|http://smotri\.com/video/view/\?id=.*)' ## The download from dailymotion failed with a 403 __version__ = '0.1' __description__ = """Video Download Plugin based on downloadvimeo.com""" -- cgit v1.2.3 From 36152ba7dec241e9b10cfc01bd2aeb78547cb046 Mon Sep 17 00:00:00 2001 From: Nold360 <nold@lavabit.com> Date: Tue, 16 Apr 2013 10:00:46 +0200 Subject: Added circlecaptcha to NCryptIn-Plugin --- module/plugins/crypter/NCryptIn.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index a8eaac631..996ff581e 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -52,6 +52,7 @@ class NCryptIn(Crypter): package_links.extend(self.handleContainers()) package_links.extend(self.handleCNL2()) package_links = set(package_links) + self.logDebug(package_links) # Pack self.packages = [(package_name, package_links, folder_name)] @@ -65,7 +66,7 @@ class NCryptIn(Crypter): rexpr = re.compile(pattern, re.DOTALL) content = re.sub(rexpr, "", content) return content - + def isOnline(self): if "Your folder does not exist" in self.cleanedHtml: self.logDebug("File not found") @@ -121,6 +122,19 @@ class NCryptIn(Crypter): challenge, code = recaptcha.challenge(id) postData['recaptcha_challenge_field'] = challenge postData['recaptcha_response_field'] = code + + # Resolve circlecaptcha + if "circlecaptcha" in form: + self.captcha = True + self.logDebug("Captcha protected") + captcha_img_url = "http://ncrypt.in/classes/captcha/circlecaptcha.php" + coords = self.decryptCaptcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional') + self.logDebug("Captcha resolved, coords [%s]" % str(coords)) + self.captcha_post_url = self.pyfile.url + + postData['circle.x'] = coords[0] + postData['circle.y'] = coords[1] + # Unlock protection postData['submit_protected'] = 'Continue to folder ' @@ -221,4 +235,4 @@ class NCryptIn(Crypter): # Log and return self.logDebug("Block has %d links" % len(links)) - return links \ No newline at end of file + return links -- cgit v1.2.3 From b8bc5ecae9de0eb2bc6f6310d024ecc2fc845c84 Mon Sep 17 00:00:00 2001 From: Nold360 <nold@lavabit.com> Date: Tue, 16 Apr 2013 10:02:52 +0200 Subject: Added Workaround for duplicate links in NCryptIn --- module/plugins/crypter/NCryptIn.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 996ff581e..0d0a884cf 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -51,6 +51,7 @@ class NCryptIn(Crypter): package_links.extend(self.handleWebLinks()) package_links.extend(self.handleContainers()) package_links.extend(self.handleCNL2()) + package_links = self.removeContainers(package_links) package_links = set(package_links) self.logDebug(package_links) @@ -67,6 +68,19 @@ class NCryptIn(Crypter): content = re.sub(rexpr, "", content) return content + def removeContainers(self,package_links): + tmp_package_links = package_links[:] + for link in tmp_package_links: + self.logDebug(link) + if ".dlc" in link or ".ccf" in link or ".rsdf" in link: + self.logDebug("Removing [%s] from package_links" % link) + package_links.remove(link) + + if len(package_links) > 0: + return package_links + else: + return tmp_package_links + def isOnline(self): if "Your folder does not exist" in self.cleanedHtml: self.logDebug("File not found") @@ -123,7 +137,7 @@ class NCryptIn(Crypter): postData['recaptcha_challenge_field'] = challenge postData['recaptcha_response_field'] = code - # Resolve circlecaptcha + # Resolve anicaptcha if "circlecaptcha" in form: self.captcha = True self.logDebug("Captcha protected") -- cgit v1.2.3 From feac135f3bf8d1b4fa47c427daaf09f20e8d3ff3 Mon Sep 17 00:00:00 2001 From: Nold360 <nold@lavabit.com> Date: Tue, 16 Apr 2013 10:16:57 +0200 Subject: I hate this comment.. but now it's finally fixed... --- module/plugins/crypter/NCryptIn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 0d0a884cf..63ac58a43 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -137,7 +137,7 @@ class NCryptIn(Crypter): postData['recaptcha_challenge_field'] = challenge postData['recaptcha_response_field'] = code - # Resolve anicaptcha + # Resolve circlecaptcha if "circlecaptcha" in form: self.captcha = True self.logDebug("Captcha protected") -- cgit v1.2.3 From c53df556a166ca9dedc67b7ca2c11fe08d88bf02 Mon Sep 17 00:00:00 2001 From: Nold360 <nold@lavabit.com> Date: Tue, 16 Apr 2013 12:27:52 +0200 Subject: Converted tabs to spaces --- module/plugins/crypter/NCryptIn.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 63ac58a43..5e1ea347c 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -50,10 +50,9 @@ class NCryptIn(Crypter): package_links = [] package_links.extend(self.handleWebLinks()) package_links.extend(self.handleContainers()) - package_links.extend(self.handleCNL2()) - package_links = self.removeContainers(package_links) + package_links.extend(self.handleCNL2()) + package_links = self.removeContainers(package_links) package_links = set(package_links) - self.logDebug(package_links) # Pack self.packages = [(package_name, package_links, folder_name)] -- cgit v1.2.3 From 14d9964ed8b4c501d79546d99b50d053381f6630 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Tue, 16 Apr 2013 21:14:55 +0200 Subject: EasybytezCom: fixed direct link error. http://forum.pyload.org/viewtopic.php?f=12&t=2027 --- module/plugins/hoster/EasybytezCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index 0deaa782e..5c21eff5d 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -25,7 +25,7 @@ class EasybytezCom(XFileSharingPro): __name__ = "EasybytezCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?easybytez.com/(\w+).*" - __version__ = "0.12" + __version__ = "0.13" __description__ = """easybytez.com""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -35,7 +35,7 @@ class EasybytezCom(XFileSharingPro): FILE_INFO_PATTERN = r'<tr><td align=right><b>Filename:</b></td><td nowrap>(?P<N>[^<]+)</td></tr>\s*.*?<small>\((?P<S>[^<]+)\)</small>' FILE_OFFLINE_PATTERN = r'<h1>File not available</h1>' - DIRECT_LINK_PATTERN = r'(http://(\w+\.easybytez\.com|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' + DIRECT_LINK_PATTERN = r'(http://(\w+\.(easybytez|zingload)\.com|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' OVR_DOWNLOAD_LINK_PATTERN = r'<h2>Download Link</h2>\s*<textarea[^>]*>([^<]+)' OVR_KILL_LINK_PATTERN = r'<h2>Delete Link</h2>\s*<textarea[^>]*>([^<]+)' ERROR_PATTERN = r'(?:class=["\']err["\'][^>]*>|<Center><b>)(.*?)</' -- cgit v1.2.3 From 10e07bf671dc5c61c4016686afbd723b162cf44a Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Tue, 16 Apr 2013 21:15:59 +0200 Subject: EasybytezCom: code cleanup --- module/plugins/hoster/EasybytezCom.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index 5c21eff5d..c4a9e2ba5 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -19,8 +19,10 @@ import re from random import random from pycurl import LOW_SPEED_TIME + from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + class EasybytezCom(XFileSharingPro): __name__ = "EasybytezCom" __type__ = "hoster" @@ -33,28 +35,28 @@ class EasybytezCom(XFileSharingPro): FILE_NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>[^"]+)"' FILE_SIZE_PATTERN = r'You have requested <font color="red">[^<]+</font> \((?P<S>[^<]+)\)</font>' FILE_INFO_PATTERN = r'<tr><td align=right><b>Filename:</b></td><td nowrap>(?P<N>[^<]+)</td></tr>\s*.*?<small>\((?P<S>[^<]+)\)</small>' - FILE_OFFLINE_PATTERN = r'<h1>File not available</h1>' - + FILE_OFFLINE_PATTERN = r'<h1>File not available</h1>' + DIRECT_LINK_PATTERN = r'(http://(\w+\.(easybytez|zingload)\.com|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' OVR_DOWNLOAD_LINK_PATTERN = r'<h2>Download Link</h2>\s*<textarea[^>]*>([^<]+)' OVR_KILL_LINK_PATTERN = r'<h2>Delete Link</h2>\s*<textarea[^>]*>([^<]+)' ERROR_PATTERN = r'(?:class=["\']err["\'][^>]*>|<Center><b>)(.*?)</' - + HOSTER_NAME = "easybytez.com" - + def setup(self): self.resumeDownload = self.multiDL = self.premium def handlePremium(self): - self.html = self.load(self.pyfile.url, post = self.getPostParameters()) + self.html = self.load(self.pyfile.url, post=self.getPostParameters()) found = re.search(self.DIRECT_LINK_PATTERN, self.html) if not found: self.parseError('DIRECT LINK') self.startDownload(found.group(1)) def handleOverriden(self): self.html = self.load("http://www.%s/" % self.HOSTER_NAME) - action, inputs = self.parseHtmlForm('') - upload_id = "%012d" % int(random()*10**12) + action, inputs = self.parseHtmlForm('') + upload_id = "%012d" % int(random() * 10 ** 12) action += upload_id + "&js_on=1&utype=prem&upload_type=url" inputs['tos'] = '1' inputs['url_mass'] = self.pyfile.url @@ -63,22 +65,23 @@ class EasybytezCom(XFileSharingPro): self.logDebug(action, inputs) #wait for file to upload to easybytez.com self.req.http.c.setopt(LOW_SPEED_TIME, 600) - self.html = self.load(action, post = inputs) + self.html = self.load(action, post=inputs) action, inputs = self.parseHtmlForm('F1') if not inputs: self.parseError('TEXTAREA') self.logDebug(inputs) if inputs['st'] == 'OK': - self.html = self.load(action, post = inputs) + self.html = self.load(action, post=inputs) elif inputs['st'] == 'Can not leech file': self.retry(max_tries=20, wait_time=180, reason=inputs['st']) else: - self.fail(inputs['st']) - - #get easybytez.com link for uploaded file + self.fail(inputs['st']) + + #get easybytez.com link for uploaded file found = re.search(self.OVR_DOWNLOAD_LINK_PATTERN, self.html) if not found: self.parseError('DIRECT LINK (OVR)') self.pyfile.url = found.group(1) self.retry() -getInfo = create_getInfo(EasybytezCom) \ No newline at end of file + +getInfo = create_getInfo(EasybytezCom) -- cgit v1.2.3 From a129e50c81e7466da7f91106ed279c346f7c3ee3 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Tue, 16 Apr 2013 21:39:01 +0200 Subject: EasybytezCom: the overridden functions were the same. --- module/plugins/hoster/EasybytezCom.py | 42 +---------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index c4a9e2ba5..96e3d93d2 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -16,10 +16,6 @@ @author: zoidberg """ -import re -from random import random -from pycurl import LOW_SPEED_TIME - from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo @@ -27,7 +23,7 @@ class EasybytezCom(XFileSharingPro): __name__ = "EasybytezCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?easybytez.com/(\w+).*" - __version__ = "0.13" + __version__ = "0.14" __description__ = """easybytez.com""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -47,41 +43,5 @@ class EasybytezCom(XFileSharingPro): def setup(self): self.resumeDownload = self.multiDL = self.premium - def handlePremium(self): - self.html = self.load(self.pyfile.url, post=self.getPostParameters()) - found = re.search(self.DIRECT_LINK_PATTERN, self.html) - if not found: self.parseError('DIRECT LINK') - self.startDownload(found.group(1)) - - def handleOverriden(self): - self.html = self.load("http://www.%s/" % self.HOSTER_NAME) - action, inputs = self.parseHtmlForm('') - upload_id = "%012d" % int(random() * 10 ** 12) - action += upload_id + "&js_on=1&utype=prem&upload_type=url" - inputs['tos'] = '1' - inputs['url_mass'] = self.pyfile.url - inputs['up1oad_type'] = 'url' - - self.logDebug(action, inputs) - #wait for file to upload to easybytez.com - self.req.http.c.setopt(LOW_SPEED_TIME, 600) - self.html = self.load(action, post=inputs) - - action, inputs = self.parseHtmlForm('F1') - if not inputs: self.parseError('TEXTAREA') - self.logDebug(inputs) - if inputs['st'] == 'OK': - self.html = self.load(action, post=inputs) - elif inputs['st'] == 'Can not leech file': - self.retry(max_tries=20, wait_time=180, reason=inputs['st']) - else: - self.fail(inputs['st']) - - #get easybytez.com link for uploaded file - found = re.search(self.OVR_DOWNLOAD_LINK_PATTERN, self.html) - if not found: self.parseError('DIRECT LINK (OVR)') - self.pyfile.url = found.group(1) - self.retry() - getInfo = create_getInfo(EasybytezCom) -- cgit v1.2.3 From c37581d307afe6e745d2421fd31ba26e4f647fa9 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Fri, 19 Apr 2013 20:04:55 +0300 Subject: OneFichierCom: version increased after adc259b69f1b283c92cfcb759fffc05d777a309a --- module/plugins/hoster/OneFichierCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 5d7e14f1e..c7c3384e9 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -7,7 +7,7 @@ class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" __pattern__ = r"(http://(\w+)\.((1fichier|d(es)?fichiers|pjointe)\.(com|fr|net|org)|(cjoint|mesfichiers|piecejointe|oi)\.(org|net)|tenvoi\.(com|org|net)|dl4free\.com|alterupload\.com|megadl.fr))" - __version__ = "0.46" + __version__ = "0.47" __description__ = """1fichier.com download hoster""" __author_name__ = ("fragonib", "the-razer", "zoidberg","imclem") __author_mail__ = ("fragonib[AT]yahoo[DOT]es", "daniel_ AT gmx DOT net", "zoidberg@mujmail.cz","imclem on github") -- cgit v1.2.3 From 9acacf2f9ad77267674f1705cf017bb60d2fc325 Mon Sep 17 00:00:00 2001 From: Stefano <l.stickell@yahoo.it> Date: Sat, 20 Apr 2013 22:10:35 +0200 Subject: New crypter EasybytezComFolder http://forum.pyload.org/viewtopic.php?p=9028#p9028 + html unescape in SimpleCrypter --- module/plugins/crypter/EasybytezComFolder.py | 60 ++++++++++++++++++++++++++++ module/plugins/internal/SimpleCrypter.py | 3 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 module/plugins/crypter/EasybytezComFolder.py (limited to 'module') diff --git a/module/plugins/crypter/EasybytezComFolder.py b/module/plugins/crypter/EasybytezComFolder.py new file mode 100644 index 000000000..1b887e421 --- /dev/null +++ b/module/plugins/crypter/EasybytezComFolder.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- + +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ + +import re + +from module.plugins.internal.SimpleCrypter import SimpleCrypter + + +class EasybytezComFolder(SimpleCrypter): + __name__ = "EasybytezComFolder" + __type__ = "crypter" + __pattern__ = r"https?://(www\.)?easybytez\.com/users/\w+/\w+" + __version__ = "0.01" + __description__ = """Easybytez Crypter Plugin""" + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + LINK_PATTERN = r'<div class="link"><a href="(http://www\.easybytez\.com/\w+)" target="_blank">.+</a></div>' + TITLE_PATTERN = r'<Title>Files of (?P<title>.+) folder' + PAGES_PATTERN = r"(\d+)Next »
\(\d+ total\)
" + + def decrypt(self, pyfile): + self.html = self.load(pyfile.url, decode=True) + + package_name, folder_name = self.getPackageNameAndFolder() + + package_links = re.findall(self.LINK_PATTERN, self.html) + + pages = re.search(self.PAGES_PATTERN, self.html) + if pages: + pages = int(pages.group(1)) + else: + pages = 1 + + p = 2 + while p <= pages: + self.html = self.load(pyfile.url, get={'page': p}, decode=True) + package_links += re.findall(self.LINK_PATTERN, self.html) + p += 1 + + self.logDebug('Package has %d links' % len(package_links)) + + if package_links: + self.packages = [(package_name, package_links, folder_name)] + else: + self.fail('Could not extract any links') \ No newline at end of file diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index c9e350e86..d935bf1da 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -20,6 +20,7 @@ import re from module.plugins.Crypter import Crypter +from module.utils import html_unescape class SimpleCrypter(Crypter): @@ -57,7 +58,7 @@ class SimpleCrypter(Crypter): if hasattr(self, 'TITLE_PATTERN'): m = re.search(self.TITLE_PATTERN, self.html) if m: - name = folder = m.group('title').strip() + name = folder = html_unescape(m.group('title').strip()) self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) return name, folder -- cgit v1.2.3 From 2847d4b8f0a534e209b0aca9c96fbffbf2759716 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 22 Apr 2013 20:50:45 +0200 Subject: MovReelCom: hoster added --- module/plugins/hoster/MovReelCom.py | 106 ++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 module/plugins/hoster/MovReelCom.py (limited to 'module') diff --git a/module/plugins/hoster/MovReelCom.py b/module/plugins/hoster/MovReelCom.py new file mode 100644 index 000000000..6f5f1d3f1 --- /dev/null +++ b/module/plugins/hoster/MovReelCom.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- +import re +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.utils import html_unescape +from module.network.RequestFactory import getURL + +class MovReelCom(SimpleHoster): + __name__ = "MovReelCom" + __type__ = "hoster" + __pattern__ = r"http://movreel.com/.*" + __version__ = "1.00" + __description__ = """MovReel.com hoster plugin""" + __author_name__ = ("JorisV83") + __author_mail__ = ("jorisv83-pyload@yahoo.com") + + FILE_INFO_PATTERN = r'You have requested http://movreel.com/.*/(?P.+?).*\((?P[\d.]+) (?P..)\)' + FILE_OFFLINE_PATTERN = r'File Not Found' + + def setup(self): + self.resumeDownload = True + self.multiDL = False + + def handleFree(self): + + # Define search patterns + op_pattern = '' + id_pattern = '' + fn_pattern = '' + re_pattern = '' + ul_pattern = '' + rand_pattern = '' + link_pattern = "var file_link = '(.*)';" + downlimit_pattern = '

You have reached the download-limit: .*

' + + # Get HTML source + self.logDebug("Getting first HTML source") + html = self.load(self.pyfile.url) + self.logDebug(" > Done") + + op_val = re.search(op_pattern, html).group(1) + id_val = re.search(id_pattern, html).group(1) + fn_val = re.search(fn_pattern, html).group(1) + re_val = re.search(re_pattern, html).group(1) + ul_val = re.search(ul_pattern, html).group(1) + + # Debug values + self.logDebug(" > Op " + op_val) + self.logDebug(" > Id " + id_val) + self.logDebug(" > Fname " + fn_val) + self.logDebug(" > Referer " + re_val) + self.logDebug(" > User Login " + ul_val) + + # Create post data + post_data = {"op" : op_val, "usr_login" : ul_val, "id" : id_val, "fname" : fn_val, "referer" : re_val, "method_free" : "+Free+Download"} + + # Post and get new HTML source + self.logDebug("Getting second HTML source") + html = self.load(self.pyfile.url, post = post_data, decode=True) + self.logDebug(" > Done") + + # Check download limit + if re.search(downlimit_pattern, html) is not None: + self.retry(3, 7200, "Download limit reached, wait 2h") + + # Retrieve data + if re.search(op_pattern, html) is not None: + op_val = re.search(op_pattern, html).group(1) + else: + self.retry(3, 10, "Second html: no op found!!") + + if re.search(id_pattern, html) is not None: + id_val = re.search(id_pattern, html).group(1) + else: + self.retry(3, 10, "Second html: no id found!!") + + if re.search(rand_pattern, html) is not None: + rand_val = re.search(rand_pattern, html).group(1) + else: + self.retry(3, 10, "Second html: no rand found!!") + + re_val = self.pyfile.url + + # Debug values + self.logDebug(" > Op " + op_val) + self.logDebug(" > Id " + id_val) + self.logDebug(" > Rand " + rand_val) + self.logDebug(" > Referer " + re_val) + + # Create post data + post_data = {"op" : op_val, "id" : id_val, "rand" : rand_val, "referer" : re_val, "method_free" : "+Free+Download", "method_premium" : "", "down_direct" : "1"} + + # Post and get new HTML source + self.logDebug("Getting third HTML source") + html = self.load(self.pyfile.url, post = post_data, decode=True) + self.logDebug(" > Done") + + # Get link value + if re.search(link_pattern, html) is not None: + link_val = re.search(link_pattern, html).group(1) + self.logDebug(" > Link " + link_val) + self.download(link_val) + else: + self.logDebug("No link found!!") + self.retry(3, 10, "No link found!!") + +getInfo = create_getInfo(MovReelCom) \ No newline at end of file -- cgit v1.2.3 From a0abc945171c06fc74e437cc438d606917a1e3ce Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 23 Apr 2013 21:04:25 +0300 Subject: DebridItaliaCom: new hoster supported --- module/plugins/hooks/DebridItaliaCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/hooks/DebridItaliaCom.py b/module/plugins/hooks/DebridItaliaCom.py index d570eebe3..955812f25 100644 --- a/module/plugins/hooks/DebridItaliaCom.py +++ b/module/plugins/hooks/DebridItaliaCom.py @@ -20,7 +20,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class DebridItaliaCom(MultiHoster): __name__ = "DebridItaliaCom" - __version__ = "0.03" + __version__ = "0.04" __type__ = "hook" __config__ = [("activated", "bool", "Activated", "False"), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), @@ -38,4 +38,4 @@ class DebridItaliaCom(MultiHoster): "bitshare.com", "share-links.biz", "putlocker.com", "uploaded.to", "speedload.org", "rapidgator.net", "likeupload.net", "cyberlocker.ch", "depositfiles.com", "extabit.com", "filefactory.com", "sharefiles.co", - "ryushare.com", "tusfiles.net", "nowvideo.co"] + "ryushare.com", "tusfiles.net", "nowvideo.co", "cloudzer.net"] -- cgit v1.2.3 From 3d1693ec11b02d5bdda1690927b2635f8b285c9b Mon Sep 17 00:00:00 2001 From: Stefano Date: Thu, 25 Apr 2013 15:31:52 +0200 Subject: UploadedTo: sometimes API returns "can't find request". Trying three times. --- module/plugins/hoster/UploadedTo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 5855f118c..b7740bb40 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -32,7 +32,10 @@ def getAPIData(urls): post["id_%s" % i] = id idMap[id] = url - api = unicode(getURL("http://uploaded.net/api/filemultiple", post=post, decode=False), 'iso-8859-1') + for i in xrange(3): + api = unicode(getURL("http://uploaded.net/api/filemultiple", post=post, decode=False), 'iso-8859-1') + if api != "can't find request": + break result = {} @@ -82,7 +85,7 @@ class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" __pattern__ = r"https?://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P\w+)" - __version__ = "0.68" + __version__ = "0.69" __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") -- cgit v1.2.3 From 726370725997433a816720b9078a102a6a3dc26e Mon Sep 17 00:00:00 2001 From: Stefano Date: Fri, 26 Apr 2013 17:29:33 +0300 Subject: RapidgatorNet: convert unicode to integer http://forum.pyload.org/viewtopic.php?f=10&t=2466 --- module/plugins/accounts/RapidgatorNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module') diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index 74825a0f9..85adc71a3 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -24,7 +24,7 @@ from module.common.json_layer import json_loads class RapidgatorNet(Account): __name__ = "RapidgatorNet" - __version__ = "0.03" + __version__ = "0.04" __type__ = "account" __description__ = """rapidgator.net account plugin""" __author_name__ = ("zoidberg") @@ -46,7 +46,7 @@ class RapidgatorNet(Account): self.scheduleRefresh(user, json['response']['reset_in']) return {"validuntil": json['response']['expire_date'], - "trafficleft": json['response']['traffic_left'] / 1024, + "trafficleft": int(json['response']['traffic_left']) / 1024, "premium": True} else: self.logError(json['response_details']) @@ -71,4 +71,4 @@ class RapidgatorNet(Account): except Exception, e: self.logError(e) - self.wrongPassword() \ No newline at end of file + self.wrongPassword() -- cgit v1.2.3 From cff3a4897e312a904a43ca0155dab922c6723d3a Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 30 Apr 2013 20:25:20 +0200 Subject: SerienjunkiesOrg: fail if the link is blocked by the GeoIP see #93 --- module/plugins/crypter/SerienjunkiesOrg.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module') diff --git a/module/plugins/crypter/SerienjunkiesOrg.py b/module/plugins/crypter/SerienjunkiesOrg.py index 0506d90fb..5d887de02 100644 --- a/module/plugins/crypter/SerienjunkiesOrg.py +++ b/module/plugins/crypter/SerienjunkiesOrg.py @@ -30,6 +30,8 @@ class SerienjunkiesOrg(Crypter): def getSJSrc(self, url): src = self.req.load(str(url)) + if "This website is not available in your country" in src: + self.fail("Not available in your country") if not src.find("Enter Serienjunkies") == -1: sleep(1) src = self.req.load(str(url)) -- cgit v1.2.3 From 376b58ed62ae2fd27e56de960a00888accff98d4 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 30 Apr 2013 20:27:18 +0200 Subject: SerienjunkiesOrg: version increased after cff3a4897e312a904a43ca0155dab922c6723d3a --- module/plugins/crypter/SerienjunkiesOrg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/SerienjunkiesOrg.py b/module/plugins/crypter/SerienjunkiesOrg.py index 5d887de02..3fcc12e36 100644 --- a/module/plugins/crypter/SerienjunkiesOrg.py +++ b/module/plugins/crypter/SerienjunkiesOrg.py @@ -11,7 +11,7 @@ class SerienjunkiesOrg(Crypter): __name__ = "SerienjunkiesOrg" __type__ = "container" __pattern__ = r"http://.*?(serienjunkies.org|dokujunkies.org)/.*?" - __version__ = "0.37" + __version__ = "0.38" __config__ = [ ("changeNameSJ", "Packagename;Show;Season;Format;Episode", "Take SJ.org name", "Show"), ("changeNameDJ", "Packagename;Show;Format;Episode", "Take DJ.org name", "Show"), -- cgit v1.2.3 From d20d733cec7f8d45b4854cc14216d94f8915d8fc Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 30 Apr 2013 21:04:05 +0200 Subject: UploadedTo: improvements to 3d1693ec11b02d5bdda1690927b2635f8b285c9b --- module/plugins/hoster/UploadedTo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index b7740bb40..21a9812ab 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -5,6 +5,7 @@ # http://ul.to/gzfhd0xs import re +from time import sleep from module.utils import html_unescape, parseFileSize @@ -32,10 +33,12 @@ def getAPIData(urls): post["id_%s" % i] = id idMap[id] = url - for i in xrange(3): + for i in xrange(5): api = unicode(getURL("http://uploaded.net/api/filemultiple", post=post, decode=False), 'iso-8859-1') if api != "can't find request": break + else: + sleep(3) result = {} @@ -85,7 +88,7 @@ class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" __pattern__ = r"https?://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P\w+)" - __version__ = "0.69" + __version__ = "0.70" __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") -- cgit v1.2.3 From 3785b7c9a96963499000d8926f4192af2aa6493c Mon Sep 17 00:00:00 2001 From: Stefano Date: Sun, 5 May 2013 19:15:02 +0200 Subject: MediafireCom: fixed #98 Mediafire now uses SolveMedia instead of ReCaptcha --- module/plugins/hoster/MediafireCom.py | 56 ++++++++--------------------------- 1 file changed, 12 insertions(+), 44 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 0e405930f..76dc0a538 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -18,7 +18,7 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo -from module.plugins.ReCaptcha import ReCaptcha +from module.plugins.internal.CaptchaService import SolveMedia from module.network.RequestFactory import getURL def replace_eval(js_expr): @@ -58,15 +58,15 @@ class MediafireCom(SimpleHoster): __name__ = "MediafireCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*mediafire\.com/(file/|(view/?|download.php)?\?)(\w{11}|\w{15})($|/)" - __version__ = "0.78" + __version__ = "0.79" __description__ = """Mediafire.com plugin - free only""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") DOWNLOAD_LINK_PATTERN = r'