From 0d4b92d58e6d4e959aeaa780cf29b8d88f46610a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 3 Oct 2014 14:00:46 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/KingfilesNet.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster/KingfilesNet.py') diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py index 66a639a14..e8aefa53b 100644 --- a/module/plugins/hoster/KingfilesNet.py +++ b/module/plugins/hoster/KingfilesNet.py @@ -11,7 +11,7 @@ class KingfilesNet(SimpleHoster): __type__ = "hoster" __version__ = "0.01" - __pattern__ = r'http://(?:www\.)?kingfiles\.net/\w{12}' + __pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P\w{12})' __description__ = """Kingfiles.net hoster plugin""" __author_name__ = ("zapp-brannigan", "Walter Purcaro") @@ -23,7 +23,6 @@ class KingfilesNet(SimpleHoster): OFFLINE_PATTERN = r'>(File Not Found

|File Not Found)' - FILE_ID_PATTERN = r'' RAND_ID_PATTERN = r'type=\"hidden\" name=\"rand\" value=\"(.+)\">' LINK_PATTERN = r'var download_url = \'(.+)\';' @@ -35,15 +34,10 @@ class KingfilesNet(SimpleHoster): def handleFree(self): - # Load main page and find file-id - a = self.load(self.pyfile.url, cookies=True, decode=True) - file_id = re.search(self.FILE_ID_PATTERN, a).group(1) - self.logDebug("file_id", file_id) - # Click the free user button post_data = {'op': "download1", 'usr_login': "", - 'id': file_id, + 'id': file_info['ID'], 'fname': self.pyfile.name, 'referer': "", 'method_free': "+"} -- cgit v1.2.3