diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-11-01 21:02:38 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-11-01 21:02:38 +0100 |
commit | a9400a640050d8152685391c84748f5f478c4c31 (patch) | |
tree | 1a373c1b40a7490fe5dba3cbac421b6f1018d846 /module/plugins/hoster/BasePlugin.py | |
parent | add hoster load.to (diff) | |
download | pyload-a9400a640050d8152685391c84748f5f478c4c31.tar.xz |
Diffstat (limited to 'module/plugins/hoster/BasePlugin.py')
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 7 |
1 files changed, 4 insertions, 3 deletions
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: |