diff options
-rw-r--r-- | yt_dlp/YoutubeDL.py | 8 | ||||
-rw-r--r-- | yt_dlp/cookies.py | 5 | ||||
-rw-r--r-- | yt_dlp/extractor/fc2.py | 3 | ||||
-rw-r--r-- | yt_dlp/extractor/twitter.py | 3 |
4 files changed, 14 insertions, 5 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 1fb551754..2043614ed 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3050,9 +3050,11 @@ class YoutubeDL(object): 'while also allowing unplayable formats to be downloaded. ' 'The formats won\'t be merged to prevent data corruption.') elif not merger.available: - self.report_warning( - 'You have requested merging of multiple formats but ffmpeg is not installed. ' - 'The formats won\'t be merged.') + msg = 'You have requested merging of multiple formats but ffmpeg is not installed' + if not self.params.get('ignoreerrors'): + self.report_error(f'{msg}. Aborting due to --abort-on-error') + return + self.report_warning(f'{msg}. The formats won\'t be merged') if temp_filename == '-': reason = ('using a downloader other than ffmpeg' if FFmpegFD.can_merge_formats(info_dict, self.params) diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py index fc033a8ae..7265cad81 100644 --- a/yt_dlp/cookies.py +++ b/yt_dlp/cookies.py @@ -454,7 +454,10 @@ def _extract_safari_cookies(profile, logger): cookies_path = os.path.expanduser('~/Library/Cookies/Cookies.binarycookies') if not os.path.isfile(cookies_path): - raise FileNotFoundError('could not find safari cookies database') + logger.debug('Trying secondary cookie location') + cookies_path = os.path.expanduser('~/Library/Containers/com.apple.Safari/Data/Library/Cookies/Cookies.binarycookies') + if not os.path.isfile(cookies_path): + raise FileNotFoundError('could not find safari cookies database') with open(cookies_path, 'rb') as f: cookies_data = f.read() diff --git a/yt_dlp/extractor/fc2.py b/yt_dlp/extractor/fc2.py index a407ba158..2c19a0c6e 100644 --- a/yt_dlp/extractor/fc2.py +++ b/yt_dlp/extractor/fc2.py @@ -90,7 +90,7 @@ class FC2IE(InfoExtractor): webpage, 'title', fatal=False) thumbnail = self._og_search_thumbnail(webpage) - description = self._og_search_description(webpage) + description = self._og_search_description(webpage, default=None) vidplaylist = self._download_json( 'https://video.fc2.com/api/v3/videoplaylist/%s?sh=1&fs=0' % video_id, video_id, @@ -105,6 +105,7 @@ class FC2IE(InfoExtractor): 'title': title, 'url': vid_url, 'ext': 'mp4', + 'protocol': 'm3u8_native', 'description': description, 'thumbnail': thumbnail, } diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py index 8565a7c46..8ccc38e24 100644 --- a/yt_dlp/extractor/twitter.py +++ b/yt_dlp/extractor/twitter.py @@ -90,6 +90,9 @@ class TwitterBaseIE(InfoExtractor): headers = { 'Authorization': 'Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw', } + token = self._get_cookies(self._API_BASE).get('ct0') + if token: + headers['x-csrf-token'] = token.value if not self._GUEST_TOKEN: self._GUEST_TOKEN = self._download_json( self._API_BASE + 'guest/activate.json', video_id, |