summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/PremiumTo.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-12-14 16:47:49 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-12-27 21:22:11 +0100
commit8fe2fa85605c091369c8e69b36d1cded2cd9bbe0 (patch)
treea0d5745b1168fe887568fc6af1004c19ce44f4b6 /module/plugins/hoster/PremiumTo.py
parent[ExternalScripts] Update and fix (diff)
downloadpyload-8fe2fa85605c091369c8e69b36d1cded2cd9bbe0.tar.xz
Update hosters (1)
Diffstat (limited to 'module/plugins/hoster/PremiumTo.py')
-rw-r--r--module/plugins/hoster/PremiumTo.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py
index 9f005efe0..d550c91bd 100644
--- a/module/plugins/hoster/PremiumTo.py
+++ b/module/plugins/hoster/PremiumTo.py
@@ -4,14 +4,14 @@ from __future__ import with_statement
import os
-from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-from module.plugins.internal.utils import encode
+from module.plugins.internal.MultiHoster import MultiHoster
+from module.plugins.internal.misc import encode
class PremiumTo(MultiHoster):
__name__ = "PremiumTo"
__type__ = "hoster"
- __version__ = "0.28"
+ __version__ = "0.29"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -42,21 +42,20 @@ class PremiumTo(MultiHoster):
def check_download(self):
- if self.check_file({'nopremium': "No premium account available"}):
+ if self.scan_download({'nopremium': "No premium account available"}):
self.retry(60, 5 * 60, "No premium account available")
err = ""
if self.req.http.code == "420":
#: Custom error code send - fail
file = encode(self.last_download)
+
with open(file, "rb") as f:
err = f.read(256).strip()
- os.remove(file)
+
+ self.remove(file)
if err:
self.fail(err)
return super(PremiumTo, self).check_download()
-
-
-getInfo = create_getInfo(PremiumTo)