diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-08-01 19:35:59 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-08-01 19:35:59 +0200 |
commit | ba916633f2bedb04c7358000b91aed69f52e8e43 (patch) | |
tree | 5b0e323417bf2ac9f3d88b4234c7e8da98d30f5c /module/plugins/hoster/XVideosCom.py | |
parent | [DepositfilesCom] Fix missing declaration (thx hmlinaric) (diff) | |
download | pyload-ba916633f2bedb04c7358000b91aed69f52e8e43.tar.xz |
Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics
Diffstat (limited to 'module/plugins/hoster/XVideosCom.py')
-rw-r--r-- | module/plugins/hoster/XVideosCom.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py index 76dfdadad..4f2611740 100644 --- a/module/plugins/hoster/XVideosCom.py +++ b/module/plugins/hoster/XVideosCom.py @@ -1,23 +1,28 @@ # -*- coding: utf-8 -*- import re -import urllib + +from urllib import unquote from module.plugins.Hoster import Hoster class XVideosCom(Hoster): __name__ = "XVideos.com" + __type__ = "hoster" __version__ = "0.1" + __pattern__ = r'http://(?:www\.)?xvideos\.com/video([0-9]+)/.*' + __description__ = """XVideos.com hoster plugin""" __author_name__ = None __author_mail__ = None + def process(self, pyfile): site = self.load(pyfile.url) pyfile.name = "%s (%s).flv" % ( re.search(r"<h2>([^<]+)<span", site).group(1), re.match(self.__pattern__, pyfile.url).group(1), ) - self.download(urllib.unquote(re.search(r"flv_url=([^&]+)&", site).group(1))) + self.download(unquote(re.search(r"flv_url=([^&]+)&", site).group(1))) |