From e370517032aeb5f8305d9e0fdc26f643ff30f883 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Wed, 4 Jan 2012 17:52:43 +0100 Subject: filesonic pattern fix (thanx Lino24), fix mu life account, closed #463 easybytez --- module/plugins/hoster/FilesonicCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FilesonicCom.py') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 813333acb..6094859ef 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -45,15 +45,15 @@ def getId(url): class FilesonicCom(Hoster): __name__ = "FilesonicCom" __type__ = "hoster" - __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?" - __version__ = "0.33" + __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/file/(([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?" + __version__ = "0.34" __description__ = """FilesonicCom und Sharingmatrix Download Hoster""" __author_name__ = ("jeix", "paulking") __author_mail__ = ("jeix@hasnomail.de", "") API_ADDRESS = "http://api.filesonic.com" URL_DOMAIN_PATTERN = r'(?P.*?)(?P.(filesonic|sharingmatrix)\..+?)(?P/.*)' - FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[0-9]+)(/.*)?' #change may break wupload - be careful + FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?' #change may break wupload - be careful FILE_LINK_PATTERN = r'

Start download' WAIT_TIME_PATTERN = r'countDownDelay = (?P\d+)' WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />" -- cgit v1.2.3 From a72688b208ed4ba3e98234e995f7bc1eb4afec42 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Mon, 16 Jan 2012 20:44:19 +0100 Subject: merge in plugin updates --- module/plugins/hoster/FilesonicCom.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/FilesonicCom.py') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 6094859ef..f0fbab1d9 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -3,10 +3,11 @@ import re import string +from urllib import unquote from module.plugins.Hoster import Hoster from module.plugins.ReCaptcha import ReCaptcha -from module.plugins.Plugin import chunks +from module.utils import chunks from module.network.RequestFactory import getURL from module.common.json_layer import json_loads @@ -28,9 +29,9 @@ def getInfo(urls): response = json_loads(getURL(check_url, decode=True)) for item in response["FSApi_Link"]["getInfo"]["response"]["links"]: if item["status"] != "AVAILABLE": - result.append((None, 0, 1, ids[str(item["id"])])) + result.append((ids[str(item["id"])], 0, 1, ids[str(item["id"])])) else: - result.append((item["filename"], item["size"], 2, ids[str(item["id"])])) + result.append((unquote(item["filename"]), item["size"], 2, ids[str(item["id"])])) yield result @@ -45,8 +46,8 @@ def getId(url): class FilesonicCom(Hoster): __name__ = "FilesonicCom" __type__ = "hoster" - __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/file/(([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?" - __version__ = "0.34" + __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/.*?file/([a-zA-Z0-9]+(/.+)?|[a-z0-9]+/[0-9]+(/.+)?|[0-9]+(/.+)?)" + __version__ = "0.35" __description__ = """FilesonicCom und Sharingmatrix Download Hoster""" __author_name__ = ("jeix", "paulking") __author_mail__ = ("jeix@hasnomail.de", "") @@ -54,7 +55,7 @@ class FilesonicCom(Hoster): API_ADDRESS = "http://api.filesonic.com" URL_DOMAIN_PATTERN = r'(?P.*?)(?P.(filesonic|sharingmatrix)\..+?)(?P/.*)' FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?' #change may break wupload - be careful - FILE_LINK_PATTERN = r'

Start download' + FILE_LINK_PATTERN = r'Your download is ready

\s*\d+)' WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />" WAIT_TM_HASH_PATTERN = r"name='tm_hash' value='(.*?)' />" @@ -97,7 +98,7 @@ class FilesonicCom(Hoster): #if item["is_premium_only"] != 0 and not self.premium: # self.fail("need premium account for file") - self.pyfile.name = item["filename"] + self.pyfile.name = unquote(item["filename"]) # Fix the url and resolve the domain to the correct regional variation url = item["url"] -- cgit v1.2.3