From 9b3d6ccaf321a44a0f6b9570be099ec465f79faa Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 12 Jul 2013 13:39:54 +0200 Subject: working multihoster addon --- pyload/plugins/accounts/Premium4Me.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'pyload/plugins/accounts/Premium4Me.py') diff --git a/pyload/plugins/accounts/Premium4Me.py b/pyload/plugins/accounts/Premium4Me.py index fbca3ce84..3b0d24488 100644 --- a/pyload/plugins/accounts/Premium4Me.py +++ b/pyload/plugins/accounts/Premium4Me.py @@ -1,6 +1,7 @@ -from module.plugins.Account import Account -class Premium4Me(Account): +from pyload.plugins.MultiHoster import MultiHoster + +class Premium4Me(MultiHoster): __name__ = "Premium4Me" __version__ = "0.03" __type__ = "account" @@ -20,4 +21,8 @@ class Premium4Me(Account): self.authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % (user, data["password"])).strip() if "wrong username" in self.authcode: - self.wrongPassword() \ No newline at end of file + self.wrongPassword() + + def loadHosterList(self, req): + page = req.load("http://premium.to/api/hosters.php?authcode=%s" % self.authcode) + return [x.strip() for x in page.replace("\"", "").split(";")] \ No newline at end of file -- cgit v1.2.3