From 81849ccf245196cdc7963d9c3953d1b4623308e5 Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 18 Feb 2013 21:10:38 +0100 Subject: SpeedLoadOrg: Checksum verification implemented Loading API data to allow plugins such as Checksum to work --- module/plugins/hoster/SpeedLoadOrg.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py index 92abbb04e..e0d82ed08 100644 --- a/module/plugins/hoster/SpeedLoadOrg.py +++ b/module/plugins/hoster/SpeedLoadOrg.py @@ -3,6 +3,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo from module.network.RequestFactory import getURL from module.plugins.ReCaptcha import ReCaptcha import re +from ast import literal_eval def getInfo(urls): @@ -19,16 +20,18 @@ class SpeedLoadOrg(SimpleHoster): __name__ = "SpeedLoadOrg" __type__ = "hoster" __pattern__ = r"http://(www\.)?speedload\.org/(?P\w+).*" - __version__ = "0.02" + __version__ = "0.03" __description__ = """Speedload.org hoster plugin""" - __author_name__ = ("z00nx") - __author_mail__ = ("z00nx0@gmail.com") + __author_name__ = ("z00nx", "stickell") + __author_mail__ = ("z00nx0@gmail.com", "l.stickell@yahoo.it") FILE_NAME_PATTERN = '
Date: Mon, 18 Feb 2013 22:05:23 +0100 Subject: Using the JSON parser --- module/plugins/hoster/SpeedLoadOrg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py index e0d82ed08..b7599cabf 100644 --- a/module/plugins/hoster/SpeedLoadOrg.py +++ b/module/plugins/hoster/SpeedLoadOrg.py @@ -2,8 +2,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo from module.network.RequestFactory import getURL from module.plugins.ReCaptcha import ReCaptcha +from module.common.json_layer import loads import re -from ast import literal_eval def getInfo(urls): @@ -20,7 +20,7 @@ class SpeedLoadOrg(SimpleHoster): __name__ = "SpeedLoadOrg" __type__ = "hoster" __pattern__ = r"http://(www\.)?speedload\.org/(?P\w+).*" - __version__ = "0.03" + __version__ = "0.04" __description__ = """Speedload.org hoster plugin""" __author_name__ = ("z00nx", "stickell") __author_mail__ = ("z00nx0@gmail.com", "l.stickell@yahoo.it") @@ -52,5 +52,5 @@ class SpeedLoadOrg(SimpleHoster): def getApiData(self): self.file_id = re.search(self.__pattern__, self.pyfile.url).group('ID') - self.api_data = literal_eval(getURL(self.API_URL + self.file_id)) + self.api_data = loads(getURL(self.API_URL + self.file_id)) self.api_data['size'] = self.api_data['fileSize'] -- cgit v1.2.3 From a48b97491d0152140817a37f84c7beb046dad315 Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 18 Feb 2013 23:18:29 +0100 Subject: Fixed incorrect function name --- module/plugins/hoster/SpeedLoadOrg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py index b7599cabf..e74114742 100644 --- a/module/plugins/hoster/SpeedLoadOrg.py +++ b/module/plugins/hoster/SpeedLoadOrg.py @@ -2,7 +2,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo from module.network.RequestFactory import getURL from module.plugins.ReCaptcha import ReCaptcha -from module.common.json_layer import loads +from module.common.json_layer import json_loads import re @@ -52,5 +52,5 @@ class SpeedLoadOrg(SimpleHoster): def getApiData(self): self.file_id = re.search(self.__pattern__, self.pyfile.url).group('ID') - self.api_data = loads(getURL(self.API_URL + self.file_id)) + self.api_data = json_loads(getURL(self.API_URL + self.file_id)) self.api_data['size'] = self.api_data['fileSize'] -- cgit v1.2.3