summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-23 22:02:16 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-23 22:02:16 +0100
commit2d492e58810a5c0c1a52cee4837b3ca4697531a3 (patch)
treea7dc1b9421f708cbfd3efe375f9f6670a783f030 /module/plugins/hoster
parentadded missing curl.close (diff)
downloadpyload-2d492e58810a5c0c1a52cee4837b3ca4697531a3.tar.xz
FileSonic Premium
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/FilesonicCom.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py
index b79fc406d..5e2c10219 100644
--- a/module/plugins/hoster/FilesonicCom.py
+++ b/module/plugins/hoster/FilesonicCom.py
@@ -24,14 +24,17 @@ class FilesonicCom(Hoster):
self.url = self.convertURL(self.pyfile.url)
- self.html = self.load(self.url)
+ self.html = self.load(self.url, cookies=False)
name = re.search(r'Filename:\s*</span>\s*<strong>(.*?)<', self.html)
if name:
self.pyfile.name = name.group(1)
else:
self.offline()
- self.download(self.getFileUrl())
+ if self.account:
+ self.download(pyfile.url)
+ else:
+ self.download(self.getFileUrl())
def getFileUrl(self):
@@ -55,7 +58,7 @@ class FilesonicCom(Hoster):
self.wantReconnect = True
self.setWait(wait_time)
- self.log.info("%s: Waiting %d seconds." % self.__name__, wait_time)
+ self.log.info("%s: Waiting %d seconds." % (self.__name__, wait_time))
self.wait()
tm = re.search("name='tm' value='(.*?)' />", self.html).group(1)
@@ -69,7 +72,7 @@ class FilesonicCom(Hoster):
if "Please Enter Password" in self.html:
self.fail("implement need pw")
- chall = re.search(r'Recaptcha.create("(.*?)",', self.html)
+ chall = re.search(r'Recaptcha.create\("(.*?)",', self.html)
if chall:
re_captcha = ReCaptcha(self)
challenge, result = re_captcha.challenge(chall.group(1))
@@ -86,7 +89,7 @@ class FilesonicCom(Hoster):
id = re.search("/file/([0-9]+(/.+)?)", url)
if not id:
id = re.search("/file/[a-z0-9]+/([0-9]+(/.+)?)", url)
- return ("http://www.filesonic.com/file/" + id.group(1))
+ return "http://www.filesonic.com/file/" + id.group(1)
def handleErrors(self):
if "The file that you're trying to download is larger than" in self.html: