diff options
author | Stefano <l.stickell@yahoo.it> | 2013-07-29 15:34:24 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-07-29 15:34:24 +0200 |
commit | e80cf653ed72dded886a82d8168088158315e9a9 (patch) | |
tree | e2d4e6433f678495cc53ff33fa6efa561e0bfd9a /pyload | |
parent | Moving plugins from module to pyload (diff) | |
download | pyload-e80cf653ed72dded886a82d8168088158315e9a9.tar.xz |
Adapted UnrestrictLi
Diffstat (limited to 'pyload')
-rw-r--r-- | pyload/plugins/accounts/UnrestrictLi.py | 14 | ||||
-rw-r--r-- | pyload/plugins/hoster/UnrestrictLi.py | 4 |
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(): |