From 7e1d66ad5fdc3908e20d532d98ac819dd3437fe1 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 9 Nov 2012 23:14:33 +0100 Subject: update XFileSharingPro & add billionuploads,sendmyway,sharebees plugins --- module/plugins/hoster/BillionuploadsCom.py | 17 ++++ module/plugins/hoster/SendmywayCom.py | 18 ++++ module/plugins/hoster/SharebeesCom.py | 19 ++++ module/plugins/hoster/XFileSharingPro.py | 139 ++++++++++++++++------------- 4 files changed, 132 insertions(+), 61 deletions(-) create mode 100644 module/plugins/hoster/BillionuploadsCom.py create mode 100644 module/plugins/hoster/SendmywayCom.py create mode 100644 module/plugins/hoster/SharebeesCom.py (limited to 'module/plugins') diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py new file mode 100644 index 000000000..5b053d547 --- /dev/null +++ b/module/plugins/hoster/BillionuploadsCom.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + +class BillionuploadsCom(XFileSharingPro): + __name__ = "BillionuploadsCom" + __type__ = "hoster" + __pattern__ = r"http://(?:\w*\.)*?billionuploads.com/\w{12}" + __version__ = "0.01" + __description__ = """billionuploads.com hoster plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + FILE_NAME_PATTERN = r'Filename:(?P.*?)
' + FILE_SIZE_PATTERN = r'Size:(?P.*?)
' + HOSTER_NAME = "billionuploads.com" + +getInfo = create_getInfo(BillionuploadsCom) diff --git a/module/plugins/hoster/SendmywayCom.py b/module/plugins/hoster/SendmywayCom.py new file mode 100644 index 000000000..fcbac850a --- /dev/null +++ b/module/plugins/hoster/SendmywayCom.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + + +class SendmywayCom(XFileSharingPro): + __name__ = "SendmywayCom" + __type__ = "hoster" + __pattern__ = r"http://(?:\w*\.)*?sendmyway.com/\w{12}" + __version__ = "0.01" + __description__ = """SendMyWay hoster plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + FILE_NAME_PATTERN = r'

<.*?>\s*(?P.+)' + FILE_SIZE_PATTERN = r'\((?P\d+) bytes\)' + HOSTER_NAME = "sendmyway.com" + +getInfo = create_getInfo(SendmywayCom) diff --git a/module/plugins/hoster/SharebeesCom.py b/module/plugins/hoster/SharebeesCom.py new file mode 100644 index 000000000..f5bacc5b0 --- /dev/null +++ b/module/plugins/hoster/SharebeesCom.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + + +class SharebeesCom(XFileSharingPro): + __name__ = "SharebeesCom" + __type__ = "hoster" + __pattern__ = r"http://(?:\w*\.)*?sharebees.com/\w{12}" + __version__ = "0.01" + __description__ = """ShareBees hoster plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + FILE_NAME_PATTERN = r'

<.*?>\s*(?P.+)' + FILE_SIZE_PATTERN = r'\((?P\d+) bytes\)' + FORM_PATTERN = 'F1' + HOSTER_NAME = "sharebees.com" + +getInfo = create_getInfo(SharebeesCom) diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 713198754..d58a7073e 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -3,7 +3,7 @@ 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. + 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 @@ -34,7 +34,7 @@ class XFileSharingPro(SimpleHoster): __name__ = "XFileSharingPro" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.13" + __version__ = "0.14" __description__ = """XFileSharingPro common hoster base""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -52,21 +52,18 @@ class XFileSharingPro(SimpleHoster): RECAPTCHA_URL_PATTERN = r'http://[^"\']+?recaptcha[^"\']+?\?k=([^"\']+)"' CAPTCHA_DIV_PATTERN = r'Enter code.*?(.*?)' ERROR_PATTERN = r'class=["\']err["\'][^>]*>(.*?)(\d)', html_unescape(captcha_div)) inputs['code'] = "".join([a[1] for a in sorted(numerals, key = lambda num: int(num[0]))]) - self.logDebug("CAPTCHA", inputs['code'], numerals) - return 3 + self.logDebug("CAPTCHA", inputs['code'], numerals) + return 3 return 0 - + getInfo = create_getInfo(XFileSharingPro) \ No newline at end of file -- cgit v1.2.3