Browse Source

[bitchute] Fix extraction by pass custom User-Agent

master-ytdl-org
Andrew Udvare 6 years ago
committed by Sergey M
parent
commit
02df41354c
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      youtube_dl/extractor/bitchute.py

+ 3
- 1
youtube_dl/extractor/bitchute.py View File

@ -33,7 +33,9 @@ class BitChuteIE(InfoExtractor):
video_id = self._match_id(url)
webpage = self._download_webpage(
'https://www.bitchute.com/video/%s' % video_id, video_id)
'https://www.bitchute.com/video/%s' % video_id, video_id, headers={
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.57 Safari/537.36',
})
title = self._search_regex(
(r'<[^>]+\bid=["\']video-title[^>]+>([^<]+)', r'<title>([^<]+)'),


Loading…
Cancel
Save