summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/Base.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-01 23:21:14 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-01 23:21:14 +0200
commitab3c90a7b0d18f47d3efc8259906895c1f50765d (patch)
treeec3cde40c03e1c771d026ba2d4917f4229a31dcc /module/plugins/internal/Base.py
parentMerge pull request #1902 from GammaC0de/patch-3 (diff)
downloadpyload-ab3c90a7b0d18f47d3efc8259906895c1f50765d.tar.xz
Fixpack (1)
Diffstat (limited to 'module/plugins/internal/Base.py')
-rw-r--r--module/plugins/internal/Base.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/module/plugins/internal/Base.py b/module/plugins/internal/Base.py
index 4235cf94d..843d2ad11 100644
--- a/module/plugins/internal/Base.py
+++ b/module/plugins/internal/Base.py
@@ -19,11 +19,21 @@ def getInfo(urls):
#@TODO: Remove in 0.4.10
+def parse_fileInfo(klass, url="", html=""):
+ info = klass.get_info(url, html)
+ return encode(info['name']), info['size'], info['status'], info['url']
+
+
+#@TODO: Remove in 0.4.10
def create_getInfo(klass):
def get_info(urls):
for url in urls:
- if hasattr(klass, "URL_REPLACEMENTS"):
+ try:
url = replace_patterns(url, klass.URL_REPLACEMENTS)
+
+ except Exception:
+ pass
+
yield parse_fileInfo(klass, url)
return get_info
@@ -42,7 +52,7 @@ def check_abort(fn):
class Base(Plugin):
__name__ = "Base"
__type__ = "base"
- __version__ = "0.01"
+ __version__ = "0.02"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -366,7 +376,7 @@ class Base(Plugin):
@check_abort
def load(self, *args, **kwargs):
- return super(Hoster, self).load(*args, **kwargs)
+ return super(Base, self).load(*args, **kwargs)
def check_abort(self):