diff options
Diffstat (limited to 'module/plugins/hoster/NarodRu.py')
-rw-r--r-- | module/plugins/hoster/NarodRu.py | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 396e207a0..18bed0231 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -1,30 +1,19 @@ # -*- 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 <http://www.gnu.org/licenses/>. -""" - import re + from random import random + from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class NarodRu(SimpleHoster): __name__ = "NarodRu" __type__ = "hoster" - __pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/[0-9]+\.\w+-narod\.yandex\.ru)/(?P<ID>\d+)/.+' __version__ = "0.1" + + __pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/[0-9]+\.\w+-narod\.yandex\.ru)/(?P<ID>\d+)/.+' + __description__ = """Narod.ru hoster plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" @@ -40,6 +29,7 @@ class NarodRu(SimpleHoster): CAPTCHA_PATTERN = r'<number url="(.*?)">(\w+)</number>' LINK_PATTERN = r'<a class="h-link" rel="yandex_bar" href="(.+?)">' + def handleFree(self): for _ in xrange(5): self.html = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random() * 777)) |