aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-14 21:36:03 -0500
committerJesús <heckyel@hyperbola.info>2022-02-14 21:36:03 -0500
commit4f624b4480a00019ff589b4b6b6060d59e241cef (patch)
tree51f399e65ea50d7afb6e665c6b764b9a17ee26d6
parentefa26c289d48935cbd6410843cbe19c9f9d83bb0 (diff)
parent2d41e2ecebb62b572d8bb5b2e4e51ba12f3f0510 (diff)
downloadhypervideo-pre-4f624b4480a00019ff589b4b6b6060d59e241cef.tar.lz
hypervideo-pre-4f624b4480a00019ff589b4b6b6060d59e241cef.tar.xz
hypervideo-pre-4f624b4480a00019ff589b4b6b6060d59e241cef.zip
updated from upstream | 14/02/2022 at 21:36
-rw-r--r--yt_dlp/YoutubeDL.py8
-rw-r--r--yt_dlp/cookies.py5
-rw-r--r--yt_dlp/extractor/fc2.py3
-rw-r--r--yt_dlp/extractor/twitter.py3
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,