From 39cf572a4e6e85d1ecd542476ffe2636f0ecc708 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Wed, 12 Sep 2012 21:20:54 +0200 Subject: update mediafire, rusfolder --- module/plugins/hoster/IfolderRu.py | 33 ++++++++++++++------------------- module/plugins/hoster/MediafireCom.py | 10 ++++++---- module/plugins/internal/SimpleHoster.py | 4 ++-- 3 files changed, 22 insertions(+), 25 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index b84f77c5c..a21cc748b 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -24,9 +24,9 @@ from module.network.RequestFactory import getURL class IfolderRu(SimpleHoster): __name__ = "IfolderRu" __type__ = "hoster" - __pattern__ = r"http://(?:[^.]*\.)?ifolder.ru/(\d+).*" - __version__ = "0.35" - __description__ = """ifolder.ru""" + __pattern__ = r"http://(?:[^.]*\.)?(?:ifolder.ru|rusfolder.com)/(?P\d+).*" + __version__ = "0.36" + __description__ = """rusfolder.com / ifolder.ru""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -35,9 +35,7 @@ class IfolderRu(SimpleHoster): FILE_SIZE_PATTERN = ur'(?:
)?Размер:(?:)? (?P[^<]+)<(?:/div|br)>' FILE_OFFLINE_PATTERN = ur'

Файл номер [^<]* (не найден|удален) !!!

' - SESSION_ID_PATTERN = r']+)>' - FORM1_PATTERN = r'
(.*?)
' - FORM_INPUT_PATTERN = r']* name="?([^" ]+)"? value="?([^" ]+)"?[^>]*>' + SESSION_ID_PATTERN = r'
]+)>' INTS_SESSION_PATTERN = r'\(\'ints_session\'\);\s*if\(tag\)\{tag.value = "([^"]+)";\}' HIDDEN_INPUT_PATTERN = r"var v = .*?name='([^']+)' value='1'" DOWNLOAD_LINK_PATTERN = r'' - FILE_SIZE_PATTERN = r'>Download\s*\((?P[^)]+)\)' + FILE_INFO_PATTERN = r"oFileSharePopup\.ald\('(?P[^']*)','(?P[^']*)','(?P[^']*)','','(?P[^']*)'\)" FILE_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File.
' def setup(self): self.multiDL = False def process(self, pyfile): + pyfile.url = re.sub(r'/view/?\?', '/?', pyfile.url) + self.url, result = checkHTMLHeader(pyfile.url) self.logDebug('Location (%d): %s' % (result, self.url)) @@ -85,7 +87,7 @@ class MediafireCom(SimpleHoster): self.html = self.load(self.url, decode = True) self.checkCaptcha() self.multiDL = True - self.getFileInfo() + self.check_data = self.getFileInfo() if self.account: self.handlePremium() diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 566615120..6d7bb6284 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -39,7 +39,7 @@ def set_cookies(cj, cookies): cj.setCookie(domain, name, value) def parseHtmlTagAttrValue(attr_name, tag): - m = re.search(r"%s\s*=\s*([\"']?)((?<=\")[^\"]+|(?<=')[^']+|[^\s\"'][^>\s]+)\1" % attr_name, tag) + m = re.search(r"%s\s*=\s*([\"']?)((?<=\")[^\"]+|(?<=')[^']+|[^>\s\"'][^>\s]*)\1" % attr_name, tag, re.I) return m.group(2) if m else None def parseHtmlForm(attr_str, html): @@ -129,7 +129,7 @@ class PluginParseError(Exception): class SimpleHoster(Hoster): __name__ = "SimpleHoster" - __version__ = "0.25" + __version__ = "0.26" __pattern__ = None __type__ = "hoster" __description__ = """Base hoster plugin""" -- cgit v1.2.3