summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-08 03:23:09 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-08 03:23:09 +0200
commiteb9edff095dd9f83966723be506a4fd91f64a8c9 (patch)
tree903bea357d2dcaa0e81c60116bb3e9eef12a2ba7 /module/plugins/hoster
parent[UserAgentSwitcher] Fix https://github.com/pyload/pyload/issues/1324 (diff)
downloadpyload-eb9edff095dd9f83966723be506a4fd91f64a8c9.tar.xz
[SolidfilesCom] Cleanup
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/Solidfiles.py42
-rw-r--r--module/plugins/hoster/SolidfilesCom.py33
2 files changed, 33 insertions, 42 deletions
diff --git a/module/plugins/hoster/Solidfiles.py b/module/plugins/hoster/Solidfiles.py
deleted file mode 100644
index 54631ee50..000000000
--- a/module/plugins/hoster/Solidfiles.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Test links:
-# http://www.solidfiles.com/d/609cdb4b1b
-
-import re
-
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-
-
-class solidfiles(SimpleHoster):
- __name__ = "solidfiles"
- __type__ = "hoster"
- __version__ = "0.01"
-
- __pattern__ = r'http:\/\/(?:www\.)?solidfiles\.com\/\w+\/(\w)+\/(\w|.|\d)*'
-
- __description__ = """ solidfiles.com hoster plugin """
- __license__ = "GPLv3"
- __authors__ = [("sraedler", "simon.raedler@yahoo.de")]
-
-
- NAME_PATTERN = r'<h1 title="(?P<N>(\w|\d|\.)+)"'
- SIZE_PATTERN = r'<p class="meta">(?P<S>(\d|\.)+) (?P<U>(\w)+)'
- OFFLINE_PATTERN = r'<h1>404<\/h1>'
-
- LINK_FREE_PATTERN = r'id="ddl-text" href="(https:\/\/(\w|\d|\.|\/)+)"'
-
- def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
-
-
- def handleFree(self, pyfile):
- # Search for Download URL
- m = re.search(self.LINK_FREE_PATTERN, self.html)
- if m is None:
- self.error(_("LINK_FREE_PATTERN not found"))
- self.logDebug("Downloadlink: " + m.group(1))
- self.download(m.group(1))
-
-getInfo = create_getInfo(solidfiles) \ No newline at end of file
diff --git a/module/plugins/hoster/SolidfilesCom.py b/module/plugins/hoster/SolidfilesCom.py
new file mode 100644
index 000000000..d359577d6
--- /dev/null
+++ b/module/plugins/hoster/SolidfilesCom.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+#
+# Test links:
+# http://www.solidfiles.com/d/609cdb4b1b
+
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
+
+class SolidfilesCom(SimpleHoster):
+ __name__ = "SolidfilesCom"
+ __type__ = "hoster"
+ __version__ = "0.02"
+
+ __pattern__ = r'http://(?:www\.)?solidfiles\.com\/d/\w+'
+
+ __description__ = """Solidfiles.com hoster plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("sraedler", "simon.raedler@yahoo.de")]
+
+
+ NAME_PATTERN = r'<h1 title="(?P<N>.+?)"'
+ SIZE_PATTERN = r'<p class="meta">(?P<S>[\d.,]+) (?P<U>[\w_^]+)'
+ OFFLINE_PATTERN = r'<h1>404'
+
+ LINK_FREE_PATTERN = r'id="ddl-text" href="(.+?)"'
+
+
+ def setup(self):
+ self.multiDL = True
+ self.chunkLimit = 1
+
+
+getInfo = create_getInfo(SolidfilesCom)