From 16af85004c84d0d6c626b4f8424ce9647669a0c1 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 9 Jun 2013 18:10:22 +0200 Subject: moved everything from module to pyload --- pyload/plugins/hoster/IfolderRu.py | 90 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 pyload/plugins/hoster/IfolderRu.py (limited to 'pyload/plugins/hoster/IfolderRu.py') diff --git a/pyload/plugins/hoster/IfolderRu.py b/pyload/plugins/hoster/IfolderRu.py new file mode 100644 index 000000000..6accbc524 --- /dev/null +++ b/pyload/plugins/hoster/IfolderRu.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + @author: zoidberg +""" + +import re +from urllib import quote +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.network.RequestFactory import getURL + +class IfolderRu(SimpleHoster): + __name__ = "IfolderRu" + __type__ = "hoster" + __pattern__ = r"http://(?:[^.]*\.)?(?:ifolder\.ru|rusfolder\.(?:com|net|ru))/(?:files/)?(?P\d+).*" + __version__ = "0.37" + __description__ = """rusfolder.com / ifolder.ru""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + FILE_SIZE_REPLACEMENTS = [(u'Кб', 'KB'), (u'Мб', 'MB'), (u'Гб', 'GB')] + FILE_NAME_PATTERN = ur'(?:
)?Название:(?:)? (?P[^<]+)<(?:/div|br)>' + FILE_SIZE_PATTERN = ur'(?:
)?Размер:(?:)? (?P[^<]+)<(?:/div|br)>' + FILE_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'" + DOWNLOAD_LINK_PATTERN = r'неверный код,
введите еще раз
' + + def setup(self): + self.resumeDownload = self.multiDL = True if self.account else False + self.chunkLimit = 1 + + def process(self, pyfile): + file_id = re.search(self.__pattern__, pyfile.url).group('ID') + self.html = self.load("http://rusfolder.com/%s" % file_id, cookies=True, decode=True) + self.getFileInfo() + + url = re.search('