mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
[youtube] Always request webpage in English (Fixes #3844)
This commit is contained in:
parent
1770ed9e86
commit
e2dce53781
1 changed files with 3 additions and 1 deletions
|
@ -655,7 +655,9 @@ def _real_extract(self, url):
|
|||
|
||||
# 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)
|
||||
|
|
Loading…
Reference in a new issue