summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-13 23:25:45 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-13 23:25:45 +0100
commit8144d3c78df968ae00e35c327730af981220ac89 (patch)
tree9499fb887aea2e1d8c77f27e7dc8863bda8b0851
parent[XFileSharingPro] Update BUILTIN lists (diff)
downloadpyload-8144d3c78df968ae00e35c327730af981220ac89.tar.xz
New plugin: ExashareCom
-rw-r--r--module/plugins/accounts/ExashareCom.py16
-rw-r--r--module/plugins/hoster/ExashareCom.py38
2 files changed, 54 insertions, 0 deletions
diff --git a/module/plugins/accounts/ExashareCom.py b/module/plugins/accounts/ExashareCom.py
new file mode 100644
index 000000000..431798522
--- /dev/null
+++ b/module/plugins/accounts/ExashareCom.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.internal.XFSAccount import XFSAccount
+
+
+class ExashareCom(XFSAccount):
+ __name__ = "ExashareCom"
+ __type__ = "account"
+ __version__ = "0.01"
+
+ __description__ = """Exashare.com account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ HOSTER_DOMAIN = "exashare.com"
diff --git a/module/plugins/hoster/ExashareCom.py b/module/plugins/hoster/ExashareCom.py
new file mode 100644
index 000000000..536c09b6d
--- /dev/null
+++ b/module/plugins/hoster/ExashareCom.py
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
+
+
+class ExashareCom(XFSHoster):
+ __name__ = "ExashareCom"
+ __type__ = "hoster"
+ __version__ = "0.01"
+
+ __pattern__ = r'http://(?:www\.)?exashare\.com/\w{12}'
+
+ __description__ = """Exashare.com hoster plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ INFO_PATTERN = r'>(?P<NAME>.+?)<small>\( (?P<S>[\d.,]+) (?P<U>[\w^_]+)'
+ LINK_FREE_PATTERN = r'file: "(.+?)"'
+
+
+ def setup(self):
+ self.multiDL = True
+ self.chunkLimit = 1
+ self.resumeDownload = self.premium
+
+
+ def handleFree(self, pyfile):
+ m = re.search(self.LINK_FREE_PATTERN, self.html)
+ if m is None:
+ self.error(_("Free download link not found"))
+ else:
+ self.link = m.group(1)
+
+
+getInfo = create_getInfo(ExashareCom)