projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1770ed9
)
[youtube] Always request webpage in English (Fixes #3844)
author
Philipp Hagemeister
<phihag@phihag.de>
Sun, 28 Sep 2014 23:39:26 +0000
(
01:39
+0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sun, 28 Sep 2014 23:39:26 +0000
(
01:39
+0200)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 045507bc73f211a7227439fbe6425de9de0d658d..61228817e319c6571525d1e821593b5b899b5010 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-655,7
+655,9
@@
class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
# Get video webpage
url = proto + '://www.youtube.com/watch?v=%s&gl=US&hl=en&has_verified=1' % video_id
- video_webpage = self._download_webpage(url, video_id)
+ req = compat_urllib_request.Request(url)
+ req.add_header('Cookie', 'PREF=hl=en')
+ video_webpage = self._download_webpage(req, video_id)
# Attempt to extract SWF player URL
mobj = re.search(r'swfConfig.*?"(https?:\\/\\/.*?watch.*?-.*?\.swf)"', video_webpage)