From a9400a640050d8152685391c84748f5f478c4c31 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 1 Nov 2011 21:02:38 +0100 Subject: closed #412, #266 --- module/plugins/hoster/BasePlugin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/BasePlugin.py') diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 095d2644e..428afeee4 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -1,15 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import re from module.plugins.Hoster import Hoster from module.utils import html_unescape +from urlparse import urlparse + class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.11" + __version__ = "0.12" __description__ = """Base Plugin when any other didnt fit""" __author_name__ = ("RaNaN") __author_mail__ = ("RaNaN@pyload.org") @@ -39,7 +40,7 @@ class BasePlugin(Hoster): # return if pyfile.url.startswith("http"): - pyfile.name = html_unescape(re.findall("([^/=]+)", pyfile.url)[-1]) + pyfile.name = html_unescape(urlparse(pyfile.url).path.split("/")[-1]) self.download(pyfile.url, disposition=True) else: -- cgit v1.2.3