From dbab8fd6cda68f2650e97a5d68a055c4424cd3a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 31 Dec 2014 00:08:37 +0100 Subject: [LetitbitNet] Use getURL instead urlopen --- module/plugins/hoster/LetitbitNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index a7b11047f..f3921fdb7 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -8,18 +8,18 @@ import re -from urllib import urlencode, urlopen from urlparse import urljoin from module.common.json_layer import json_loads, json_dumps +from module.network.RequestFactory import getURL from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, secondsToMidnight def api_download_info(url): json_data = ["yw7XQy2v9", ["download/info", {"link": url}]] - post_data = urlencode({'r': json_dumps(json_data)}) - api_rep = urlopen("http://api.letitbit.net/json", data=post_data).read() + api_rep = getURL("http://api.letitbit.net/json", + post={'r': json_dumps(json_data)}) return json_loads(api_rep) @@ -36,7 +36,7 @@ def getInfo(urls): class LetitbitNet(SimpleHoster): __name__ = "LetitbitNet" __type__ = "hoster" - __version__ = "0.27" + __version__ = "0.28" __pattern__ = r'https?://(?:www\.)?(letitbit|shareflare)\.net/download/.+' -- cgit v1.2.3