From a3714d9c2c1d3e4668b1653e9c1428fb8006bc46 Mon Sep 17 00:00:00 2001 From: guidobelix Date: Thu, 23 Oct 2014 09:42:42 +0200 Subject: [SafesharingEu] Added support for registered users. new file: module/plugins/accounts/SafesharingEu.py modified: module/plugins/hoster/SafesharingEu.py --- module/plugins/accounts/SafesharingEu.py | 16 ++++++++++++++ module/plugins/hoster/SafesharingEu.py | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 module/plugins/accounts/SafesharingEu.py create mode 100644 module/plugins/hoster/SafesharingEu.py (limited to 'module') diff --git a/module/plugins/accounts/SafesharingEu.py b/module/plugins/accounts/SafesharingEu.py new file mode 100644 index 000000000..55ea129ca --- /dev/null +++ b/module/plugins/accounts/SafesharingEu.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.XFSPAccount import XFSPAccount + + +class SafesharingEu(XFSPAccount): + __name__ = "SafesharingEu" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Safesharing.eu account plugin""" + __license__ = "GPLv3" + __authors__ = [("guidobelix", "guidobelix@hotmail.it")] + + + HOSTER_URL = "http://www.safesharing.eu/" diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py new file mode 100644 index 000000000..d4064c452 --- /dev/null +++ b/module/plugins/hoster/SafesharingEu.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# +# Test link: +# http://safesharing.eu/h1ijvcrpl9ys + +# Test link (offline): +# http://safesharing.eu/h1ijvcrpl9ysgggggg + +from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo + + +class SafesharingEu(XFSPHoster): + __name__ = "SafesharingEu" + __type__ = "hoster" + __version__ = "0.02" + + __pattern__ = r'https?://(?:\w+\.)?safesharing.eu/\w+' + + __description__ = """Safesharing.eu hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] + + HOSTER_NAME = "safesharing.eu" + + FILE_NAME_PATTERN = r'Filename:(?P.*)' + FILE_SIZE_PATTERN = r'Size:(?P.*) (?P[kKmMbB]*) ' + + FILE_ID_PATTERN = r'' + FILE_OFFLINE_PATTERN = r'File Not Found' + + WAIT_PATTERN = r'You have to wait (\d+) minutes' + COUNTDOWN_PATTERN = r'
Wait (\d+) seconds' + + RECAPTCHA_KEY_PATTERN = r'' + RANDOM_STRING_PATTERN = r'' + + +getInfo = create_getInfo(SafesharingEu) -- cgit v1.2.3 From c8f619e773e836c4c03462a5b1095599396bf79e Mon Sep 17 00:00:00 2001 From: Guido Galliani Date: Fri, 24 Oct 2014 07:11:55 +0200 Subject: [SafesharingEu] Improved patterns modified: module/plugins/accounts/SafesharingEu.py modified: module/plugins/hoster/SafesharingEu.py --- module/plugins/accounts/SafesharingEu.py | 5 ++++- module/plugins/hoster/SafesharingEu.py | 10 +++------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'module') diff --git a/module/plugins/accounts/SafesharingEu.py b/module/plugins/accounts/SafesharingEu.py index 55ea129ca..10a0bcb93 100644 --- a/module/plugins/accounts/SafesharingEu.py +++ b/module/plugins/accounts/SafesharingEu.py @@ -13,4 +13,7 @@ class SafesharingEu(XFSPAccount): __authors__ = [("guidobelix", "guidobelix@hotmail.it")] - HOSTER_URL = "http://www.safesharing.eu/" + HOSTER_NAME = "safesharing.eu" + + VALID_UNTIL_PATTERN = r'> Premium.[Aa]ccount expire:(.+?)' + TRAFFIC_LEFT_PATTERN = r'> Traffic available today:\s*?(?P[\d.,]+)\s*?(?:(?P[\w^_]+)\s*)?' diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py index d4064c452..cbb448d02 100644 --- a/module/plugins/hoster/SafesharingEu.py +++ b/module/plugins/hoster/SafesharingEu.py @@ -1,10 +1,4 @@ # -*- coding: utf-8 -*- -# -# Test link: -# http://safesharing.eu/h1ijvcrpl9ys - -# Test link (offline): -# http://safesharing.eu/h1ijvcrpl9ysgggggg from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo @@ -26,7 +20,9 @@ class SafesharingEu(XFSPHoster): FILE_SIZE_PATTERN = r'Size:(?P.*) (?P[kKmMbB]*) ' FILE_ID_PATTERN = r'' - FILE_OFFLINE_PATTERN = r'File Not Found' + OFFLINE_PATTERN = r'File Not Found' + TEMP_OFFLINE_PATTERN = r'This server is in maintenance mode' + WAIT_PATTERN = r'You have to wait (\d+) minutes' COUNTDOWN_PATTERN = r'
Wait (\d+) seconds' -- cgit v1.2.3 From 221a6fd47f3f805ad81c43651b04636415eea547 Mon Sep 17 00:00:00 2001 From: guidobelix Date: Wed, 29 Oct 2014 23:10:09 +0100 Subject: [SafesharingEu] Improved error handling --- module/plugins/hoster/SafesharingEu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py index cbb448d02..1cfd63efc 100644 --- a/module/plugins/hoster/SafesharingEu.py +++ b/module/plugins/hoster/SafesharingEu.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo class SafesharingEu(XFSPHoster): __name__ = "SafesharingEu" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:\w+\.)?safesharing.eu/\w+' @@ -30,5 +30,7 @@ class SafesharingEu(XFSPHoster): RECAPTCHA_KEY_PATTERN = r'' RANDOM_STRING_PATTERN = r'' + ERROR_PATTERN = r'(?:
)(.+?)(?:
)' + getInfo = create_getInfo(SafesharingEu) -- cgit v1.2.3 From 22a63894b3a6bc206458f0c022b8aa6d7e8d5437 Mon Sep 17 00:00:00 2001 From: guidobelix Date: Thu, 23 Oct 2014 09:42:42 +0200 Subject: [SafesharingEu] Added support for registered users. new file: module/plugins/accounts/SafesharingEu.py modified: module/plugins/hoster/SafesharingEu.py --- module/plugins/accounts/SafesharingEu.py | 8 ++++---- module/plugins/hoster/SafesharingEu.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'module') diff --git a/module/plugins/accounts/SafesharingEu.py b/module/plugins/accounts/SafesharingEu.py index 10a0bcb93..a2b964cba 100644 --- a/module/plugins/accounts/SafesharingEu.py +++ b/module/plugins/accounts/SafesharingEu.py @@ -1,19 +1,19 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSPAccount import XFSPAccount +from module.plugins.internal.XFSAccount import XFSAccount -class SafesharingEu(XFSPAccount): +class SafesharingEu(XFSAccount): __name__ = "SafesharingEu" __type__ = "account" - __version__ = "0.01" + __version__ = "0.02" __description__ = """Safesharing.eu account plugin""" __license__ = "GPLv3" __authors__ = [("guidobelix", "guidobelix@hotmail.it")] - HOSTER_NAME = "safesharing.eu" + HOSTER_DOMAIN = "safesharing.eu" VALID_UNTIL_PATTERN = r'> Premium.[Aa]ccount expire:(.+?)' TRAFFIC_LEFT_PATTERN = r'> Traffic available today:\s*?(?P[\d.,]+)\s*?(?:(?P[\w^_]+)\s*)?' diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py index 1cfd63efc..92a0ff932 100644 --- a/module/plugins/hoster/SafesharingEu.py +++ b/module/plugins/hoster/SafesharingEu.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo -class SafesharingEu(XFSPHoster): +class SafesharingEu(XFSHoster): __name__ = "SafesharingEu" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:\w+\.)?safesharing.eu/\w+' @@ -14,7 +14,7 @@ class SafesharingEu(XFSPHoster): __license__ = "GPLv3" __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] - HOSTER_NAME = "safesharing.eu" + HOSTER_DOMAIN = "safesharing.eu" FILE_NAME_PATTERN = r'Filename:(?P.*)' FILE_SIZE_PATTERN = r'Size:(?P.*) (?P[kKmMbB]*) ' -- cgit v1.2.3