Merge pull request #242 from internetarchive/yt-dlp-03

for the record, @avdempsey ok'd this elsewhere
This commit is contained in:
Barbara Miller 2022-03-22 10:23:58 -07:00 committed by GitHub
commit 7ee6ea50d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,8 +223,9 @@ def _build_youtube_dl(worker, destdir, site):
def ydl_postprocess_hook(d):
if d['status'] == 'finished':
print('[ydl_postprocess_hook] Done postprocessing')
if worker._using_warcprox(site):
worker.logger.info('[ydl_postprocess_hook] Finished postprocessing')
worker.logger.info('[ydl_postprocess_hook] postprocessor: {}'.format(d['postprocessor']))
if d['postprocessor'] == 'FixupM3u8' and worker._using_warcprox(site):
_YoutubeDL._push_stitched_up_vid_to_warcprox(_YoutubeDL, site, d['info_dict'])
ydl_opts = {
@ -247,6 +248,7 @@ def _build_youtube_dl(worker, destdir, site):
# "If --prefer-free-formats is used, the order changes to opus > ogg > webm > m4a > mp3 > aac."
# "ext: Equivalent to vext,aext"
"format_sort": ["ext"],
"format": "b/bv+ba",
# --cache-dir local or...
"cache_dir": False,