summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/BasePlugin.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-02 01:41:15 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-02 01:41:15 +0100
commitd622107c1c869dd27f2104f97184e24bc35c48be (patch)
tree3cc1e52a8fafd6af1fbd81a1c245050fc8f8b913 /module/plugins/hoster/BasePlugin.py
parentCaptcha9Kw should be initialized activated false (diff)
downloadpyload-d622107c1c869dd27f2104f97184e24bc35c48be.tar.xz
[MultiHoster][SimpleHoster] Improve info stuff
Diffstat (limited to 'module/plugins/hoster/BasePlugin.py')
-rw-r--r--module/plugins/hoster/BasePlugin.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index 4f9e25a35..f9eb695ca 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -13,7 +13,7 @@ from module.plugins.Hoster import Hoster
class BasePlugin(Hoster):
__name__ = "BasePlugin"
__type__ = "hoster"
- __version__ = "0.33"
+ __version__ = "0.34"
__pattern__ = r'^unmatchable$'
@@ -25,10 +25,11 @@ class BasePlugin(Hoster):
@classmethod
def getInfo(cls, url="", html=""): #@TODO: Move to hoster class in 0.4.10
- url = unquote(url)
- return {'name' : (urlparse(url).path.split('/')[-1]
- or urlparse(url).query.split('=', 1)[::-1][0].split('&', 1)[0]
- or _("Unknown")),
+ url = unquote(url)
+ url_p = urlparse(url)
+ return {'name' : (url_p.path.split('/')[-1]
+ or url_p.query.split('=', 1)[::-1][0].split('&', 1)[0]
+ or url_p.netloc.split('.', 1)[0]),
'size' : 0,
'status': 3 if url else 8,
'url' : url}