aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/dumpert.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-04-09 19:53:00 +0600
committerSergey M․ <dstftw@gmail.com>2015-04-09 19:53:00 +0600
commitaa2af7ba7469370f987aa178ac031fdad00aae3d (patch)
tree14c19bda60109a11cb3891f27090755b07af64de /youtube_dl/extractor/dumpert.py
parentce73839fe4bc1ac43d7a6540df040139f82948b1 (diff)
[dumpert] Add nsfw cookie (Closes #5382)
Diffstat (limited to 'youtube_dl/extractor/dumpert.py')
-rw-r--r--youtube_dl/extractor/dumpert.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/dumpert.py b/youtube_dl/extractor/dumpert.py
index e43bc81b2..9c594b757 100644
--- a/youtube_dl/extractor/dumpert.py
+++ b/youtube_dl/extractor/dumpert.py
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
import base64
from .common import InfoExtractor
+from ..compat import compat_urllib_request
from ..utils import qualities
@@ -23,7 +24,10 @@ class DumpertIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
- webpage = self._download_webpage(url, video_id)
+
+ req = compat_urllib_request.Request(url)
+ req.add_header('Cookie', 'nsfw=1')
+ webpage = self._download_webpage(req, video_id)
files_base64 = self._search_regex(
r'data-files="([^"]+)"', webpage, 'data files')