summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hoster')
-rw-r--r--pyload/plugins/hoster/Ftp.py4
-rw-r--r--pyload/plugins/hoster/MyfastfileCom.py (renamed from pyload/plugins/hoster/MultiDebridCom.py)16
-rw-r--r--pyload/plugins/hoster/PremiumTo.py (renamed from pyload/plugins/hoster/Premium4Me.py)17
3 files changed, 21 insertions, 16 deletions
diff --git a/pyload/plugins/hoster/Ftp.py b/pyload/plugins/hoster/Ftp.py
index f9b3865a7..641d93276 100644
--- a/pyload/plugins/hoster/Ftp.py
+++ b/pyload/plugins/hoster/Ftp.py
@@ -12,7 +12,9 @@ from pyload.plugins.Hoster import Hoster
class Ftp(Hoster):
__name__ = "Ftp"
__type__ = "hoster"
- __version__ = "0.41"
+ __version__ = "0.42"
+
+ __pattern__ = r'(ftps?|sftp)://(.*?:.*?@)?.*?/.*' #: ftp://user:password@ftp.server.org/path/to/file
__description__ = """Download from ftp directory"""
__author_name__ = ("jeix", "mkaay", "zoidberg")
diff --git a/pyload/plugins/hoster/MultiDebridCom.py b/pyload/plugins/hoster/MyfastfileCom.py
index bd7d9460c..604e2ab06 100644
--- a/pyload/plugins/hoster/MultiDebridCom.py
+++ b/pyload/plugins/hoster/MyfastfileCom.py
@@ -2,18 +2,18 @@
import re
-from pyload.utils import json_loads
from pyload.plugins.Hoster import Hoster
+from pyload.utils import json_loads
-class MultiDebridCom(Hoster):
- __name__ = "MultiDebridCom"
+class MyfastfileCom(Hoster):
+ __name__ = "MyfastfileCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/'
- __description__ = """Multi-debrid.com hoster plugin"""
+ __description__ = """Myfastfile.com hoster plugin"""
__author_name__ = "stickell"
__author_mail__ = "l.stickell@yahoo.it"
@@ -26,11 +26,11 @@ class MultiDebridCom(Hoster):
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
elif not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "Multi-debrid.com")
- self.fail("No Multi-debrid.com account provided")
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "Myfastfile.com")
+ self.fail("No Myfastfile.com account provided")
else:
self.logDebug("Original URL: %s" % pyfile.url)
- page = self.req.load('http://multi-debrid.com/api.php',
+ page = self.req.load('http://myfastfile.com/api.php',
get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'],
'link': pyfile.url})
self.logDebug("JSON data: " + page)
diff --git a/pyload/plugins/hoster/Premium4Me.py b/pyload/plugins/hoster/PremiumTo.py
index 439242aa7..33df2e7bc 100644
--- a/pyload/plugins/hoster/Premium4Me.py
+++ b/pyload/plugins/hoster/PremiumTo.py
@@ -8,12 +8,12 @@ from pyload.plugins.Hoster import Hoster
from pyload.utils import fs_encode
-class Premium4Me(Hoster):
- __name__ = "Premium4Me"
+class PremiumTo(Hoster):
+ __name__ = "PremiumTo"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
- __pattern__ = r'http://(?:www\.)?premium.to/.*'
+ __pattern__ = r'https?://(?:www\.)?premium.to/.*'
__description__ = """Premium.to hoster plugin"""
__author_name__ = ("RaNaN", "zoidberg", "stickell")
@@ -29,7 +29,7 @@ class Premium4Me(Hoster):
self.logError(_("Please enter your %s account or deactivate this plugin") % "premium.to")
self.fail("No premium.to account provided")
- self.logDebug("premium.to: Old URL: %s" % pyfile.url)
+ self.logDebug("Old URL: %s" % pyfile.url)
tra = self.getTraffic()
@@ -37,7 +37,8 @@ class Premium4Me(Hoster):
self.req.setOption("timeout", 120)
self.download(
- "http://premium.to/api/getfile.php?authcode=%s&link=%s" % (self.account.authcode, quote(pyfile.url, "")),
+ "http://premium.to/api/getfile.php",
+ get={"username": self.account.username, "password": self.account.password, "link": quote(pyfile.url, "")},
disposition=True)
check = self.checkDownload({"nopremium": "No premium account available"})
@@ -66,7 +67,9 @@ class Premium4Me(Hoster):
def getTraffic(self):
try:
- traffic = int(self.load("http://premium.to/api/traffic.php?authcode=%s" % self.account.authcode))
+ api_r = self.load("http://premium.to/api/straffic.php",
+ get={'username': self.account.username, 'password': self.account.password})
+ traffic = sum(map(int, api_r.split(';')))
except:
traffic = 0
return traffic