From 5d13b86474afeb0e8775206308dd72d93adef5d2 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Wed, 11 Jan 2012 02:03:52 +0100 Subject: fix filepost, mediafire closed #495 --- module/plugins/hoster/FilepostCom.py | 105 ++++++++++++++++++++++------------ module/plugins/hoster/MediafireCom.py | 11 ++-- 2 files changed, 74 insertions(+), 42 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index 42ec0788b..d12fad738 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -18,7 +18,6 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.network.RequestFactory import getURL from module.plugins.ReCaptcha import ReCaptcha from module.common.json_layer import json_loads from time import time @@ -26,16 +25,17 @@ from time import time class FilepostCom(SimpleHoster): __name__ = "FilepostCom" __type__ = "hoster" - __pattern__ = r"https?://(?:www\.)?filepost\.com/files/([^/]+).*" - __version__ = "0.23" + __pattern__ = r"https?://(?:www\.)?(?:filepost\.com/files|fp.io)/([^/]+).*" + __version__ = "0.25" __description__ = """Filepost.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - FILE_INFO_PATTERN = r'

(?P[^<]+)

\s*
\s*
' + + def setup(self): + self.multiDL = True def process(self, pyfile): self.url, result = checkHTMLHeader(pyfile.url) @@ -92,8 +95,8 @@ class MediafireCom(SimpleHoster): self.download(self.url, disposition = True) def handleFree(self): - passwords = self.getPassword().split() - while re.search(self.PASSWORD_PATTERN, self.html): + passwords = self.getPassword().splitlines() + while self.PASSWORD_PATTERN in self.html: if len(passwords): password = passwords.pop(0) self.logInfo("Password protected link, trying " + password) -- cgit v1.2.3