From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/IfolderRu.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster/IfolderRu.py') diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index 255f10f45..249c2feb1 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class IfolderRu(SimpleHoster): __name__ = "IfolderRu" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.39" __pattern__ = r'http://(?:www\.)?(?:ifolder\.ru|rusfolder\.(?:com|net|ru))/(?:files/)?(?P\d+)' @@ -18,25 +18,27 @@ class IfolderRu(SimpleHoster): SIZE_REPLACEMENTS = [(u'Кб', 'KB'), (u'Мб', 'MB'), (u'Гб', 'GB')] - NAME_PATTERN = ur'(?:
)?Название:(?:)? (?P[^<]+)<(?:/div|br)>' - SIZE_PATTERN = ur'(?:
)?Размер:(?:)? (?P[^<]+)<(?:/div|br)>' + + NAME_PATTERN = ur'(?:
)?Название:(?:)? (?P[^<]+)<(?:/div|br)>' + SIZE_PATTERN = ur'(?:
)?Размер:(?:)? (?P[^<]+)<(?:/div|br)>' OFFLINE_PATTERN = ur'

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

' SESSION_ID_PATTERN = r']+)>' INTS_SESSION_PATTERN = r'\(\'ints_session\'\);\s*if\(tag\)\{tag\.value = "([^"]+)";\}' HIDDEN_INPUT_PATTERN = r'var v = .*?name=\'(.+?)\' value=\'1\'' - LINK_PATTERN = r'неверный код,
введите еще раз
' def setup(self): - self.resumeDownload = self.multiDL = True if self.account else False - self.chunkLimit = 1 + self.resumeDownload = self.multiDL = bool(self.account) + self.chunkLimit = 1 - def process(self, pyfile): - file_id = re.match(self.__pattern__, pyfile.url).group('ID') - self.html = self.load("http://rusfolder.com/%s" % file_id, cookies=True, decode=True) + def handleFree(self, pyfile): + self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID'], cookies=True, decode=True) self.getFileInfo() url = re.search(r"location\.href = '(http://ints\..*?=)'", self.html).group(1) @@ -68,9 +70,7 @@ class IfolderRu(SimpleHoster): else: self.fail(_("Invalid captcha")) - download_url = re.search(self.LINK_PATTERN, self.html).group(1) - self.correctCaptcha() - self.download(download_url) + self.link = re.search(self.LINK_PATTERN, self.html).group(1) getInfo = create_getInfo(IfolderRu) -- cgit v1.2.3