summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2011-12-13 20:21:17 +0100
committerGravatar Jeix <devnull@localhost> 2011-12-13 20:21:17 +0100
commit2c84da41e4bee1722078b0e2f94a0ac392aa8937 (patch)
treeb7d89919ca96762f768766be1036fdfefe1f8f7f /module
parentclosed #457 (diff)
downloadpyload-2c84da41e4bee1722078b0e2f94a0ac392aa8937.tar.xz
fix pornhub.com
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/PornhubCom.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index 6afa9d295..978bb04ab 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -40,8 +40,18 @@ class PornhubCom(Hoster):
post_data += "\x02\x00\x02\x2d\x31\x02\x00\x20"
post_data += "add299463d4410c6d1b1c418868225f7"
- content = self.req.load(url, post=str(post_data), no_post_encode=True)
- file_url = re.search(r'flv_url.*(http.*?)\?r=.*', content).group(1)
+ content = self.req.load(url, post=str(post_data))
+
+ new_content = ""
+ for x in content:
+ if ord(x) < 32 or ord(x) > 176:
+ new_content += '#'
+ else:
+ new_content += x
+
+ content = new_content
+
+ file_url = re.search(r'flv_url.*(http.*?)##post_roll', content).group(1)
return file_url