summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyload/plugins/accounts/UnrestrictLi.py14
-rw-r--r--pyload/plugins/hoster/UnrestrictLi.py4
2 files changed, 13 insertions, 5 deletions
diff --git a/pyload/plugins/accounts/UnrestrictLi.py b/pyload/plugins/accounts/UnrestrictLi.py
index 9ec2ea996..0e2249e1a 100644
--- a/pyload/plugins/accounts/UnrestrictLi.py
+++ b/pyload/plugins/accounts/UnrestrictLi.py
@@ -15,11 +15,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
############################################################################
-from module.plugins.Account import Account
-from module.common.json_layer import json_loads
+from pyload.plugins.MultiHoster import MultiHoster
+from pyload.utils import json_loads
-class UnrestrictLi(Account):
+class UnrestrictLi(MultiHoster):
__name__ = "UnrestrictLi"
__version__ = "0.02"
__type__ = "account"
@@ -52,3 +52,11 @@ class UnrestrictLi(Account):
if 'sign_out' not in self.html:
self.wrongPassword()
+
+ def loadHosterList(self, req):
+ json_data = req.load('http://unrestrict.li/api/jdownloader/hosts.php?format=json')
+ json_data = json_loads(json_data)
+
+ host_list = [element['host'] for element in json_data['result']]
+
+ return host_list
diff --git a/pyload/plugins/hoster/UnrestrictLi.py b/pyload/plugins/hoster/UnrestrictLi.py
index 397390691..9bb5b8b66 100644
--- a/pyload/plugins/hoster/UnrestrictLi.py
+++ b/pyload/plugins/hoster/UnrestrictLi.py
@@ -18,8 +18,8 @@
import re
from datetime import datetime, timedelta
-from module.plugins.Hoster import Hoster
-from module.common.json_layer import json_loads
+from pyload.plugins.Hoster import Hoster
+from pyload.utils import json_loads
def secondsToMidnight():