diff options
author | Christopher <4Christopher@gmx.de> | 2013-06-08 13:51:40 +0200 |
---|---|---|
committer | Christopher <4Christopher@gmx.de> | 2013-06-08 13:51:40 +0200 |
commit | 3b40cf9b963b77f81dd48b46af7492c10be6d5b1 (patch) | |
tree | 0f1315f7df0bea1dc28b7dba0a6cf57c04fbbee2 /module/plugins | |
parent | XvidstageCom.py: The plugin is now implemented based on XFileSharingPro. (diff) | |
download | pyload-3b40cf9b963b77f81dd48b46af7492c10be6d5b1.tar.xz |
XvidstageCom: Implemented as hook plugin (XFileSharingPro) and removed hoster plugin.
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hooks/XFileSharingPro.py | 46 | ||||
-rw-r--r-- | module/plugins/hoster/XvidstageCom.py | 36 |
2 files changed, 23 insertions, 59 deletions
diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 105c70113..ceaec96c6 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -5,7 +5,7 @@ import re class XFileSharingPro(Hook): __name__ = "XFileSharingPro" - __version__ = "0.04" + __version__ = "0.05" __type__ = "hook" __config__ = [ ("activated" , "bool" , "Activated" , "True"), ("loadDefault", "bool", "Include default (built-in) hoster list" , "True"), @@ -14,57 +14,57 @@ class XFileSharingPro(Hook): __description__ = """Hoster URL pattern loader for the generic XFileSharingPro plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - + def coreReady(self): self.loadPattern() - - def loadPattern(self): + + def loadPattern(self): hosterList = self.getConfigSet('includeList') - excludeList = self.getConfigSet('excludeList') - - if self.getConfig('loadDefault'): + excludeList = self.getConfigSet('excludeList') + + if self.getConfig('loadDefault'): hosterList |= set(( #WORKING HOSTERS: "aieshare.com", "asixfiles.com", "banashare.com", "cyberlocker.ch", "eyesfile.co", "eyesfile.com", - "fileband.com", "filedwon.com", "filedownloads.org", "hipfile.com", "kingsupload.com", "mlfat4arab.com", - "netuploaded.com", "odsiebie.pl", "q4share.com", "ravishare.com", "uptobox.com", "verzend.be", - #NOT TESTED: - "bebasupload.com", "boosterking.com", "divxme.com", "filevelocity.com", "glumbouploads.com", "grupload.com", "heftyfile.com", + "fileband.com", "filedwon.com", "filedownloads.org", "hipfile.com", "kingsupload.com", "mlfat4arab.com", + "netuploaded.com", "odsiebie.pl", "q4share.com", "ravishare.com", "uptobox.com", "verzend.be", "xvidstage.com", + #NOT TESTED: + "bebasupload.com", "boosterking.com", "divxme.com", "filevelocity.com", "glumbouploads.com", "grupload.com", "heftyfile.com", "host4desi.com", "laoupload.com", "linkzhost.com", "movreel.com", "rockdizfile.com", "limfile.com" - "share76.com", "sharebeast.com", "sharehut.com", "sharerun.com", "shareswift.com", "sharingonline.com", "6ybh-upload.com", - "skipfile.com", "spaadyshare.com", "space4file.com", "uploadbaz.com", "uploadc.com", - "uploaddot.com", "uploadfloor.com", "uploadic.com", "uploadville.com", "vidbull.com", "zalaa.com", + "share76.com", "sharebeast.com", "sharehut.com", "sharerun.com", "shareswift.com", "sharingonline.com", "6ybh-upload.com", + "skipfile.com", "spaadyshare.com", "space4file.com", "uploadbaz.com", "uploadc.com", + "uploaddot.com", "uploadfloor.com", "uploadic.com", "uploadville.com", "vidbull.com", "zalaa.com", "zomgupload.com", "kupload.org", "movbay.org", "multishare.org", "omegave.org", "toucansharing.org", "uflinq.org", "banicrazy.info", "flowhot.info", "upbrasil.info", "shareyourfilez.biz", "bzlink.us", "cloudcache.cc", "fileserver.cc" "farshare.to", "filemaze.ws", "filehost.ws", "filestock.ru", "moidisk.ru", "4up.im", "100shared.com", #WRONG FILE NAME: - "sendmyway.com", "upchi.co.il", "180upload.com", + "sendmyway.com", "upchi.co.il", "180upload.com", #NOT WORKING: "amonshare.com", "imageporter.com", "file4safe.com", #DOWN OR BROKEN: "ddlanime.com", "fileforth.com", "loombo.com", "goldfile.eu", "putshare.com" - )) - + )) + hosterList -= (excludeList) hosterList -= set(('', u'')) - + if not hosterList: self.unload() return - + regexp = r"http://(?:[^/]*\.)?(%s)/\w{12}" % ("|".join(sorted(hosterList)).replace('.','\.')) #self.logDebug(regexp) - + dict = self.core.pluginManager.hosterPlugins['XFileSharingPro'] dict["pattern"] = regexp dict["re"] = re.compile(regexp) self.logDebug("Pattern loaded - handling %d hosters" % len(hosterList)) - + def getConfigSet(self, option): s = self.getConfig(option).lower().replace('|',',').replace(';',',') return set([x.strip() for x in s.split(',')]) - + def unload(self): dict = self.core.pluginManager.hosterPlugins['XFileSharingPro'] dict["pattern"] = r"^unmatchable$" - dict["re"] = re.compile(r"^unmatchable$")
\ No newline at end of file + dict["re"] = re.compile(r"^unmatchable$") diff --git a/module/plugins/hoster/XvidstageCom.py b/module/plugins/hoster/XvidstageCom.py deleted file mode 100644 index 32c5fe0c3..000000000 --- a/module/plugins/hoster/XvidstageCom.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: 4Christopher -""" - -from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo - -class XvidstageCom(XFileSharingPro): - __name__ = 'XvidstageCom' - __version__ = '0.5' - __pattern__ = r'http://(?:www.)?xvidstage.com/(?P<id>[0-9A-Za-z]+)' - __type__ = 'hoster' - __description__ = """A Plugin that allows you to download files from http://xvidstage.com""" - __author_name__ = ('4Christopher') - __author_mail__ = ('4Christopher@gmx.de') - - HOSTER_NAME = "xvidstage.com" - - def setup(self): - self.resumeDownload = self.multiDL = self.premium - -getInfo = create_getInfo(XvidstageCom) |