forked from pyload/pyload
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXFileSharingPro.py
More file actions
74 lines (61 loc) · 3.5 KB
/
XFileSharingPro.py
File metadata and controls
74 lines (61 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -*- coding: utf-8 -*-
import re
from module.plugins.Hook import Hook
class XFileSharingPro(Hook):
__name__ = "XFileSharingPro"
__version__ = "0.06"
__type__ = "hook"
__config__ = [("activated", "bool", "Activated", "True"),
("loadDefault", "bool", "Include default (built-in) hoster list", "True"),
("includeList", "str", "Include hosters (comma separated)", ""),
("excludeList", "str", "Exclude hosters (comma separated)", "")]
__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):
hosterList = self.getConfigSet('includeList')
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",
"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", "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",
#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$")