summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-06-27 22:14:00 +0200
committerGravatar Jeix <devnull@localhost> 2010-06-27 22:14:00 +0200
commit5c6d14bb8d2f17882fb9ba74229d027486ea8a9c (patch)
treede3179a6652343eda3555e52c5d135f372db4d50
parentyouporn fix (diff)
downloadpyload-5c6d14bb8d2f17882fb9ba74229d027486ea8a9c.tar.xz
fixed #115
repr(url) in Request.py shows the bug. The webinterface added the links with a trailing "\r".
-rw-r--r--module/plugins/hoster/YoupornCom.py4
-rw-r--r--module/web/ajax/views.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index 220d14a9e..75ecbfe26 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -31,7 +31,7 @@ class YoupornCom(Hoster):
def download_html(self):
url = self.parent.url
- self.html = self.load(url, post={"user_choice":"Enter"})
+ self.html = self.load(url, post={"user_choice":"Enter"}, cookies=False)
def get_file_url(self):
""" returns the absolute downloadable filepath
@@ -47,7 +47,7 @@ class YoupornCom(Hoster):
self.download_html()
file_name_pattern = r".*<title>(.*) - Free Porn Videos - YouPorn.com Lite \(BETA\)</title>.*"
- return re.search(file_name_pattern, self.html).group(1) + '.flv'
+ return re.search(file_name_pattern, self.html).group(1).replace("&amp;", "&") + '.flv'
def file_exists(self):
""" returns True or False
diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py
index a0e1238aa..c52be119f 100644
--- a/module/web/ajax/views.py
+++ b/module/web/ajax/views.py
@@ -72,6 +72,7 @@ def add_package(request):
if name == None or name == "":
return HttpResponseServerError()
+ links = map(lambda x: x.strip(), links)
links = filter(lambda x: x != "", links)
settings.PYLOAD.add_package(name, links, queue)