From 394dcd448646fdaebda38b83fddcfbe6f62ded31 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Wed, 24 Mar 2021 00:34:33 +0530 Subject: [PATCH] Write current epoch to infojson when using `--no-clean-infojson` Closes #191 --- yt_dlp/YoutubeDL.py | 1 + yt_dlp/extractor/youtube.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 1e46b76b5..f527c6597 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2539,6 +2539,7 @@ class YoutubeDL(object): @staticmethod def filter_requested_info(info_dict, actually_filter=True): if not actually_filter: + info_dict['epoch'] = int(time.time()) return info_dict exceptions = { 'remove': ['requested_formats', 'requested_subtitles', 'filepath', 'entries'], diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 57300114d..620aab446 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -2150,7 +2150,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): # This will error if there is no livechat initial_data['contents']['twoColumnWatchNextResults']['conversationBar']['liveChatRenderer']['continuations'][0]['reloadContinuationData']['continuation'] info['subtitles']['live_chat'] = [{ - 'url': 'https://www.youtube.com/watch?v=%s' % video_id, # url is needed to set cookies + 'url': 'https://www.youtube.com/watch?v=%s' % video_id, # url is needed to set cookies 'video_id': video_id, 'ext': 'json', 'protocol': 'youtube_live_chat_replay',