projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce73839
)
[dumpert] Add nsfw cookie (Closes #5382)
author
Sergey M․
<dstftw@gmail.com>
Thu, 9 Apr 2015 13:53:00 +0000
(19:53 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 9 Apr 2015 13:53:00 +0000
(19:53 +0600)
youtube_dl/extractor/dumpert.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/dumpert.py
b/youtube_dl/extractor/dumpert.py
index e43bc81b22c08bccb4ad87204353781c07dbf8a5..9c594b757e4bbe41371cc603441c4dd5230e7b74 100644
(file)
--- 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
import base64
from .common import InfoExtractor
+from ..compat import compat_urllib_request
from ..utils import qualities
from ..utils import qualities
@@
-23,7
+24,10
@@
class DumpertIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
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')
files_base64 = self._search_regex(
r'data-files="([^"]+)"', webpage, 'data files')