summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/addons
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/addons')
-rw-r--r--pyload/plugins/addons/FreeWayMe.py40
-rw-r--r--pyload/plugins/addons/OverLoadMe.py28
-rw-r--r--pyload/plugins/addons/SimplyPremiumCom.py42
-rw-r--r--pyload/plugins/addons/Vipleech4uCom.py80
4 files changed, 190 insertions, 0 deletions
diff --git a/pyload/plugins/addons/FreeWayMe.py b/pyload/plugins/addons/FreeWayMe.py
new file mode 100644
index 000000000..7d4bcc852
--- /dev/null
+++ b/pyload/plugins/addons/FreeWayMe.py
@@ -0,0 +1,40 @@
+# -*- 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: Nicolas Giese
+"""
+
+from module.network.RequestFactory import getURL
+from module.plugins.internal.MultiHoster import MultiHoster
+
+
+class FreeWayMe(MultiHoster):
+ __name__ = "FreeWayMe"
+ __version__ = "0.11"
+ __type__ = "hook"
+ __description__ = """FreeWay.me hook plugin"""
+ __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 stanard download if download fails", False),
+ ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
+ __author_name__ = "Nicolas Giese"
+ __author_mail__ = "james@free-way.me"
+
+ def getHoster(self):
+ hostis = getURL("https://www.free-way.me/ajax/jd.php", get={"id": 3}).replace("\"", "").strip()
+ self.logDebug("hosters: %s" % hostis)
+ return [x.strip() for x in hostis.split(",") if x.strip()]
diff --git a/pyload/plugins/addons/OverLoadMe.py b/pyload/plugins/addons/OverLoadMe.py
new file mode 100644
index 000000000..e15d0b05f
--- /dev/null
+++ b/pyload/plugins/addons/OverLoadMe.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+
+from module.network.RequestFactory import getURL
+from module.plugins.internal.MultiHoster import MultiHoster
+
+
+class OverLoadMe(MultiHoster):
+ __name__ = "OverLoadMe"
+ __version__ = "0.01"
+ __type__ = "hook"
+ __config__ = [("activated", "bool", "Activated", False),
+ ("https", "bool", "Enable HTTPS", True),
+ ("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)", 12)]
+ __description__ = """Over-Load.me hook plugin"""
+ __author_name__ = "marley"
+ __author_mail__ = "marley@over-load.me"
+
+ def getHoster(self):
+ https = "https" if self.getConfig("https") else "http"
+ page = getURL(https + "://api.over-load.me/hoster.php",
+ get={"auth": "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}
+ ).replace("\"", "").strip()
+ self.logDebug("Hosterlist: %s" % page)
+
+ return [x.strip() for x in page.split(",") if x.strip()]
diff --git a/pyload/plugins/addons/SimplyPremiumCom.py b/pyload/plugins/addons/SimplyPremiumCom.py
new file mode 100644
index 000000000..ca1122e45
--- /dev/null
+++ b/pyload/plugins/addons/SimplyPremiumCom.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 SimplyPremiumCom(MultiHoster):
+ __name__ = "SimplyPremiumCom"
+ __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__ = """Simply-Premium.Com hook plugin"""
+ __author_name__ = ("EvolutionClip")
+ __author_mail__ = ("evolutionclip@live.de")
+
+ def getHoster(self):
+ json_data = getURL('http://www.simply-premium.com/api/hosts.php?format=json&online=1')
+ json_data = json_loads(json_data)
+
+ host_list = [element['host'] for element in json_data['result']]
+
+ return host_list
diff --git a/pyload/plugins/addons/Vipleech4uCom.py b/pyload/plugins/addons/Vipleech4uCom.py
new file mode 100644
index 000000000..b2156b017
--- /dev/null
+++ b/pyload/plugins/addons/Vipleech4uCom.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+import re
+
+from module.network.RequestFactory import getURL
+from module.plugins.internal.MultiHoster import MultiHoster
+
+
+class Vipleech4uCom(MultiHoster):
+ __name__ = "Vipleech4uCom"
+ __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)", "")]
+ __description__ = """Vipleech4u.com hook plugin"""
+ __author_name__ = ("Kagenoshin")
+ __author_mail__ = ("kagenoshin@gmx.ch")
+
+ HOSTER_PATTERN = re.compile(r'align\s*?=\s*?["\']*?left.*?<\s*?strong\s*?>([^<]*?)<', re.I)
+
+ def getHoster(self):
+ hosters = {
+ 'depositfiles': ['depositfiles.com', 'dfiles.eu'],
+ 'uploaded': ['uploaded.to', 'uploaded.net', 'ul.to'],
+ 'rapidggator': ['rapidgator.net'], # they have a typo it's called rapidgator
+ 'freakshare': ['freakshare.net', 'freakshare.com'],
+ 'filefactory': ['filefactory.com'],
+ 'bitshare': ['bitshare.com'],
+ 'share-online': ['share-online.biz', 'egoshare.com'],
+ 'youtube': ['youtube.com'],
+ 'turbobit': ['turbobit.net', 'unextfiles.com'],
+ 'firedrive': ['firedrive.com', 'putlocker.com'],
+ 'filepost': ['filepost.com', 'fp.io'],
+ 'netload': ['netload.in'],
+ 'uploadhero': ['uploadhero.com'],
+ 'ryushare': ['ryushare.com'],
+ }
+
+ #check if the list is still valid
+ self.check_for_new_or_removed_hosters(hosters)
+
+ #build list
+ hoster_list = []
+
+ for item in hosters.itervalues():
+ hoster_list.extend(item)
+
+ return hoster_list
+
+ def check_for_new_or_removed_hosters(self, hosters):
+ #get the old hosters
+ old_hosters = hosters.keys()
+
+ #load the current hosters from vipleech4u.com
+ page = getURL('http://vipleech4u.com/hosts.php')
+ current_hosters = self.HOSTER_PATTERN.findall(page)
+ current_hosters = [x.lower() for x in current_hosters]
+
+ #let's look for new hosters
+ new_hosters = []
+
+ for hoster in current_hosters:
+ if not hoster in old_hosters:
+ new_hosters.append(hoster)
+
+ #let's look for removed hosters
+ removed_hosters = []
+
+ for hoster in old_hosters:
+ if not hoster in current_hosters:
+ removed_hosters.append(hoster)
+
+ if new_hosters:
+ self.logDebug('The following new hosters were found on vipleech4u.com: %s' % str(new_hosters))
+
+ if removed_hosters:
+ self.logDebug('The following hosters were removed from vipleech4u.com: %s' % str(removed_hosters))
+
+ if not (new_hosters and removed_hosters):
+ self.logDebug('The hoster list is still valid.')