summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hooks/XFileSharingPro.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-28 21:19:03 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-28 21:19:03 +0200
commit46c6fc74a4e423927554f024b78dbbbf33e982cd (patch)
treee7ff9580bb5e80b91e2bd9609409116a19c5941e /pyload/plugins/hooks/XFileSharingPro.py
parentApi : Add brackets and pipe to urlmatcher (diff)
parent[XFileSharingPro] Fixed typo (diff)
downloadpyload-46c6fc74a4e423927554f024b78dbbbf33e982cd.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: pyload/plugins/crypter/MultiuploadCom.py pyload/plugins/crypter/SerienjunkiesOrg.py pyload/plugins/hooks/ExternalScripts.py pyload/plugins/hooks/ExtractArchive.py pyload/plugins/hooks/MergeFiles.py pyload/plugins/hoster/CatShareNet.py pyload/plugins/hoster/FilezyNet.py pyload/plugins/hoster/IFileWs.py pyload/plugins/hoster/PremiumTo.py pyload/plugins/hoster/SpeedyshareCom.py pyload/plugins/hoster/UptoboxCom.py pyload/plugins/hoster/XFileSharingPro.py pyload/plugins/hoster/ZippyshareCom.py
Diffstat (limited to 'pyload/plugins/hooks/XFileSharingPro.py')
-rw-r--r--pyload/plugins/hooks/XFileSharingPro.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pyload/plugins/hooks/XFileSharingPro.py b/pyload/plugins/hooks/XFileSharingPro.py
index 7478034c6..635d5302b 100644
--- a/pyload/plugins/hooks/XFileSharingPro.py
+++ b/pyload/plugins/hooks/XFileSharingPro.py
@@ -8,7 +8,7 @@ from pyload.plugins.Hook import Hook
class XFileSharingPro(Hook):
__name__ = "XFileSharingPro"
__type__ = "hook"
- __version__ = "0.11"
+ __version__ = "0.12"
__config__ = [("activated", "bool", "Activated", True),
("loadDefault", "bool", "Include default (built-in) hoster list", True),
@@ -23,6 +23,7 @@ class XFileSharingPro(Hook):
def coreReady(self):
self.loadPattern()
+
def loadPattern(self):
hosterList = self.getConfigSet('includeList')
excludeList = self.getConfigSet('excludeList')
@@ -60,18 +61,19 @@ class XFileSharingPro(Hook):
self.unload()
return
- regexp = r"http://(?:[^/]*\.)?(%s)/\w{12}" % ("|".join(sorted(hosterList)).replace('.', '\.'))
- #self.logDebug(regexp)
+ regexp = r"http://(?:[^/]*\.)?(%s)/(?:embed-)?\w{12}" % ("|".join(sorted(hosterList)).replace('.', '\.'))
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$'