mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-08-25 00:31:10 +02:00
parent
11cc45718c
commit
6552469433
@ -2394,7 +2394,11 @@ def _real_comment_extract(contents):
|
|||||||
known_entry_comment_renderers = ('itemSectionRenderer',)
|
known_entry_comment_renderers = ('itemSectionRenderer',)
|
||||||
estimated_total = 0
|
estimated_total = 0
|
||||||
max_comments = int_or_none(self._configuration_arg('max_comments', [''])[0]) or float('inf')
|
max_comments = int_or_none(self._configuration_arg('max_comments', [''])[0]) or float('inf')
|
||||||
|
# Force English regardless of account setting to prevent parsing issues
|
||||||
|
# See: https://github.com/yt-dlp/yt-dlp/issues/532
|
||||||
|
ytcfg = copy.deepcopy(ytcfg)
|
||||||
|
traverse_obj(
|
||||||
|
ytcfg, ('INNERTUBE_CONTEXT', 'client'), expected_type=dict, default={})['hl'] = 'en'
|
||||||
try:
|
try:
|
||||||
for comment in _real_comment_extract(contents):
|
for comment in _real_comment_extract(contents):
|
||||||
if len(comments) >= max_comments:
|
if len(comments) >= max_comments:
|
||||||
|
Loading…
Reference in New Issue
Block a user