diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-23 22:02:16 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-23 22:02:16 +0100 |
commit | 2d492e58810a5c0c1a52cee4837b3ca4697531a3 (patch) | |
tree | a7dc1b9421f708cbfd3efe375f9f6670a783f030 /module/plugins/hoster/FilesonicCom.py | |
parent | added missing curl.close (diff) | |
download | pyload-2d492e58810a5c0c1a52cee4837b3ca4697531a3.tar.xz |
FileSonic Premium
Diffstat (limited to 'module/plugins/hoster/FilesonicCom.py')
-rw-r--r-- | module/plugins/hoster/FilesonicCom.py | 13 |
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:
|