summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/hoster/MyfastfileCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 10:46:28 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 10:46:28 +0100
commitce1c2b6b05c08b669357947e61ae40efce7fc50f (patch)
tree0b5f7996960cf35c4eface53a89eba18a37519b7 /pyload/plugin/hoster/MyfastfileCom.py
parentFix filename case (diff)
downloadpyload-ce1c2b6b05c08b669357947e61ae40efce7fc50f.tar.xz
module temp
Diffstat (limited to 'pyload/plugin/hoster/MyfastfileCom.py')
-rw-r--r--pyload/plugin/hoster/MyfastfileCom.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/pyload/plugin/hoster/MyfastfileCom.py b/pyload/plugin/hoster/MyfastfileCom.py
deleted file mode 100644
index b67b221d2..000000000
--- a/pyload/plugin/hoster/MyfastfileCom.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from pyload.plugin.Hoster import Hoster
-from pyload.utils import json_loads
-
-
-class MyfastfileCom(Hoster):
- __name__ = "MyfastfileCom"
- __type__ = "hoster"
- __version__ = "0.04"
-
- __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/'
-
- __description__ = """Myfastfile.com hoster plugin"""
- __license__ = "GPLv3"
- __authors__ = [("stickell", "l.stickell@yahoo.it")]
-
-
-
- def setup(self):
- self.chunkLimit = -1
- self.resumeDownload = True
-
-
- def process(self, pyfile):
- 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") % "Myfastfile.com")
- self.fail(_("No Myfastfile.com account provided"))
- else:
- self.logDebug("Original URL: %s" % pyfile.url)
- page = self.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)
- page = json_loads(page)
- if page['status'] != 'ok':
- self.fail(_("Unable to unrestrict link"))
- new_url = page['link']
-
- if new_url != pyfile.url:
- self.logDebug("Unrestricted URL: " + new_url)
-
- self.download(new_url, disposition=True)