diff options
author | Andrew Udvare <Tatsh@users.noreply.github.com> | 2018-08-27 11:04:56 -0400 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2018-08-27 22:04:56 +0700 |
commit | 02df41354cfae04555b3f78b2fcca3e66ec7faba (patch) | |
tree | 123665936e9e7b66e65ef20a999c52cfbf5516e4 /youtube_dl/extractor/bitchute.py | |
parent | dd88fd65a5eda12694104afa3fa891c640de71c6 (diff) |
[bitchute] Fix extraction by pass custom User-Agent
Diffstat (limited to 'youtube_dl/extractor/bitchute.py')
-rw-r--r-- | youtube_dl/extractor/bitchute.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/bitchute.py b/youtube_dl/extractor/bitchute.py index da263714a..446a1ab19 100644 --- a/youtube_dl/extractor/bitchute.py +++ b/youtube_dl/extractor/bitchute.py @@ -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>([^<]+)'), |