diff --git a/README.md b/README.md index ca32e09bfb..51da6622c9 100644 --- a/README.md +++ b/README.md @@ -1864,6 +1864,11 @@ #### bilibili #### digitalconcerthall * `prefer_combined_hls`: Prefer extracting combined/pre-merged video and audio HLS formats. This will exclude 4K/HEVC video and lossless/FLAC audio formats, which are only available as split video/audio HLS formats +#### mixchmovie + +* `max_comments`: Maximum number of comments to extract - default is `120` +* `fetch_interval_sec`: Comment json files fetching interval. If `max_comments` is set too large, fetch interval need to be limit + **Note**: These options may be changed/removed in the future without concern for backward compatibility diff --git a/yt_dlp/extractor/mixch.py b/yt_dlp/extractor/mixch.py index 362a3e155a..f1b485a2b1 100644 --- a/yt_dlp/extractor/mixch.py +++ b/yt_dlp/extractor/mixch.py @@ -176,7 +176,7 @@ def _get_comments(self, video_id): COMMENTS_LIMIT = 20 # If json files are downloaded too frequently, the server might ban all the access from your IP. comments_left = int_or_none(self._configuration_arg('max_comments', [''])[0]) or 120 - json_fetch_interval = int_or_none(self._configuration_arg('json_fetch_interval', [''])[0]) + fetch_interval_sec = int_or_none(self._configuration_arg('fetch_interval_sec', [''])[0]) base_url = f'https://mixch.tv/api-web/movies/{video_id}/comments' has_next = True @@ -197,8 +197,8 @@ def _get_comments(self, video_id): 'timestamp': ('created', {int_or_none}), })) - if json_fetch_interval: - self._sleep(json_fetch_interval, video_id) + if fetch_interval_sec: + self._sleep(fetch_interval_sec, video_id) has_next = traverse_obj(data, ('hasNext'), {bool_or_none}) next_cursor = traverse_obj(data, ('nextCursor'), {str_or_none})