summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-14 13:21:13 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-14 13:21:13 +0100
commit91042996f7291c5cf01afdb7ce47ca84b75a1ebb (patch)
tree48ec251c5a7a746a4c20c2ad0595a19a15b556a7 /module/plugins/hoster
parentnew ul plugin (diff)
downloadpyload-91042996f7291c5cf01afdb7ce47ca84b75a1ebb.tar.xz
ul direct download
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/UploadedTo.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index a725bb980..17765e1d3 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
import re
+
+from pycurl import error
+
from module.plugins.Hoster import Hoster
from module.network.RequestFactory import getURL
from module.plugins.Plugin import chunks
@@ -75,10 +78,15 @@ class UploadedTo(Hoster):
self.resetAccount()
self.fail(_("Traffic exceeded"))
- html = self.load(self.pyfile.url, utf8=True)
- url = re.search(r'action="(http://.*\.uploaded.to/dl\?id=[^"]+)', html)
- url = url.group(1)
- self.download(url)
+ try:
+ html = self.load(self.pyfile.url, utf8=True)
+ except error, e:
+ if e.args and e.args[0] == 23:
+ self.download(self.pyfile.url)
+ else:
+ url = re.search(r'action="(http://.*\.uploaded.to/dl\?id=[^"]+)', html)
+ url = url.group(1)
+ self.download(url)
def handleFree(self):