aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/porn91.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-20 02:34:02 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-20 02:34:02 +0600
commitd95114dd8359d10c6a0ca5eaddbbd94806173957 (patch)
treeb14d6bf402371b652a5c8e7a7ef436a12655913f /youtube_dl/extractor/porn91.py
parent94dcade8f892f27f1cdbee29be2e06c08442976e (diff)
[91porn] Unquote final URL (Closes #8881)
Diffstat (limited to 'youtube_dl/extractor/porn91.py')
-rw-r--r--youtube_dl/extractor/porn91.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/porn91.py b/youtube_dl/extractor/porn91.py
index 3e15533e9..a6dd2694c 100644
--- a/youtube_dl/extractor/porn91.py
+++ b/youtube_dl/extractor/porn91.py
@@ -1,7 +1,10 @@
# encoding: utf-8
from __future__ import unicode_literals
-from ..compat import compat_urllib_parse
+from ..compat import (
+ compat_urllib_parse,
+ compat_urllib_parse_unquote,
+)
from .common import InfoExtractor
from ..utils import (
parse_duration,
@@ -55,7 +58,8 @@ class Porn91IE(InfoExtractor):
info_cn = self._download_webpage(
'http://91porn.com/getfile.php?' + url_params, video_id,
'get real video url')
- video_url = self._search_regex(r'file=([^&]+)&', info_cn, 'url')
+ video_url = compat_urllib_parse_unquote(self._search_regex(
+ r'file=([^&]+)&', info_cn, 'url'))
duration = parse_duration(self._search_regex(
r'时长:\s*</span>\s*(\d+:\d+)', webpage, 'duration', fatal=False))