mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-05-01 21:16:13 +00:00
fix indent
This commit is contained in:
parent
6500f0c7ac
commit
f91b84fc62
@ -178,14 +178,15 @@ class MixchMovieIE(InfoExtractor):
|
|||||||
# Comments are organized in a json chain, connected with 'nextCursor' property.
|
# Comments are organized in a json chain, connected with 'nextCursor' property.
|
||||||
# There are up to 20 comments in one json file.
|
# There are up to 20 comments in one json file.
|
||||||
while has_next:
|
while has_next:
|
||||||
yield from traverse_obj(data,
|
yield from traverse_obj(
|
||||||
('comments', lambda k, v: v['comment'], {
|
data,
|
||||||
'author': ('user_name', {str_or_none}),
|
('comments', lambda k, v: v['comment'], {
|
||||||
'author_id': ('user_id', {int_or_none}),
|
'author': ('user_name', {str_or_none}),
|
||||||
'id': ('id', {int_or_none}),
|
'author_id': ('user_id', {int_or_none}),
|
||||||
'text': ('comment', {str_or_none}),
|
'id': ('id', {int_or_none}),
|
||||||
'timestamp': ('created', {int_or_none}),
|
'text': ('comment', {str_or_none}),
|
||||||
}))
|
'timestamp': ('created', {int_or_none}),
|
||||||
|
}))
|
||||||
|
|
||||||
has_next = traverse_obj(data, ('hasNext'), {bool_or_none})
|
has_next = traverse_obj(data, ('hasNext'), {bool_or_none})
|
||||||
next_cursor = traverse_obj(data, ('nextCursor'), {str_or_none})
|
next_cursor = traverse_obj(data, ('nextCursor'), {str_or_none})
|
||||||
@ -197,8 +198,9 @@ class MixchMovieIE(InfoExtractor):
|
|||||||
has_next = False
|
has_next = False
|
||||||
|
|
||||||
if has_next:
|
if has_next:
|
||||||
data = self._download_json(f'https://mixch.tv/api-web/movies/{video_id}/comments?cursor={next_cursor}&limit=20',
|
data = self._download_json(
|
||||||
(video_id, next_cursor),
|
f'https://mixch.tv/api-web/movies/{video_id}/comments?cursor={next_cursor}&limit=20',
|
||||||
note='Downloading comments', errnote='Failed to download comments')
|
(video_id, next_cursor),
|
||||||
|
note='Downloading comments', errnote='Failed to download comments')
|
||||||
# Limit comments download times to avoid server forbidding.
|
# Limit comments download times to avoid server forbidding.
|
||||||
comment_dl_times += 1
|
comment_dl_times += 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user