mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-14 18:49:06 -07:00
[utils] YoutubeDLHandler: don't use 'Youtubedl-user-agent' for overriding the default user agent
Setting the 'User-Agent' header is enough
This commit is contained in:
parent
384b62028a
commit
3fcfb8e9fa
5 changed files with 4 additions and 9 deletions
|
@ -53,7 +53,7 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||
webpage_url = self._MOBILE_TEMPLATE % mtvn_id
|
||||
req = compat_urllib_request.Request(webpage_url)
|
||||
# Otherwise we get a webpage that would execute some javascript
|
||||
req.add_header('Youtubedl-user-agent', 'curl/7')
|
||||
req.add_header('User-Agent', 'curl/7')
|
||||
webpage = self._download_webpage(req, mtvn_id,
|
||||
'Downloading mobile page')
|
||||
metrics_url = unescapeHTML(self._search_regex(r'<a href="(http://metrics.+?)"', webpage, 'url'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue