diff options
author | saintego <stegena@gmail.com> | 2015-03-27 01:28:58 +0100 |
---|---|---|
committer | saintego <stegena@gmail.com> | 2015-03-27 01:28:58 +0100 |
commit | 443271807e8eb9fa896a9e31001f64f1af180e41 (patch) | |
tree | a2a41dab884a668a2becf615ffbf544d67657010 | |
parent | [RgHostNet] Update (diff) | |
download | pyload-443271807e8eb9fa896a9e31001f64f1af180e41.tar.xz |
ifolder issue #1291
add metalare.org and fixed for new layout of page
-rw-r--r-- | module/plugins/hoster/IfolderRu.py | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index 6ebde9063..01618f37d 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -10,7 +10,7 @@ class IfolderRu(SimpleHoster): __type__ = "hoster" __version__ = "0.39" - __pattern__ = r'http://(?:www\.)?(?:ifolder\.ru|rusfolder\.(?:com|net|ru))/(?:files/)?(?P<ID>\d+)' + __pattern__ = r'http://(?:www|files\.)?(?:ifolder\.ru|metalarea\.org|rusfolder\.(?:com|net|ru))/(?:files/)?(?P<ID>\d+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Ifolder.ru hoster plugin""" @@ -24,11 +24,11 @@ class IfolderRu(SimpleHoster): SIZE_PATTERN = ur'(?:<div><span>)?Размер:(?:</span>)? <b>(?P<S>[^<]+)</b><(?:/div|br)>' OFFLINE_PATTERN = ur'<p>Файл номер <b>[^<]*</b> (не найден|удален) !!!</p>' - SESSION_ID_PATTERN = r'<a href=(http://ints\.(?:rusfolder\.com|ifolder\.ru)/ints/sponsor/\?bi=\d*&session=([^&]+)&u=[^>]+)>' + SESSION_ID_PATTERN = r'<input type="hidden" name="session" value="([^"]+)"' INTS_SESSION_PATTERN = r'\(\'ints_session\'\);\s*if\(tag\)\{tag\.value = "([^"]+)";\}' HIDDEN_INPUT_PATTERN = r'var v = .*?name=\'(.+?)\' value=\'1\'' - LINK_FREE_PATTERN = r'<a id="download_file_href" href="([^"]+)"' + LINK_FREE_PATTERN = r'<a href="([^"]+)" class="downloadbutton_files"' WRONG_CAPTCHA_PATTERN = ur'<font color=Red>неверный код,<br>введите еще раз</font><br>' @@ -39,26 +39,15 @@ class IfolderRu(SimpleHoster): def handleFree(self, pyfile): + url = "http://rusfolder.com/%s" % self.info['pattern']['ID'] self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID'], decode=True) self.getFileInfo() - url = re.search(r"location\.href = '(http://ints\..*?=)'", self.html).group(1) - self.html = self.load(url, decode=True) - - url, session_id = re.search(self.SESSION_ID_PATTERN, self.html).groups() - self.html = self.load(url, decode=True) - - url = "http://ints.rusfolder.com/ints/frame/?session=%s" % session_id - self.html = self.load(url) - - self.wait(31, False) + session_id = re.search(self.SESSION_ID_PATTERN, self.html).groups() captcha_url = "http://ints.rusfolder.com/random/images/?session=%s" % session_id for _i in xrange(5): - self.html = self.load(url) - action, inputs = self.parseHtmlForm('ID="Form1"') - inputs['ints_session'] = re.search(self.INTS_SESSION_PATTERN, self.html).group(1) - inputs[re.search(self.HIDDEN_INPUT_PATTERN, self.html).group(1)] = '1' + action, inputs = self.parseHtmlForm('id="download-step-one-form"') inputs['confirmed_number'] = self.decryptCaptcha(captcha_url, cookies=True) inputs['action'] = '1' self.logDebug(inputs) @@ -71,7 +60,8 @@ class IfolderRu(SimpleHoster): else: self.fail(_("Invalid captcha")) - self.link = re.search(self.LINK_PATTERN, self.html).group(1) + self.link = re.search(self.LINK_FREE_PATTERN, self.html).group(1) getInfo = create_getInfo(IfolderRu) + |