|
|
|
@ -146,7 +146,7 @@ class RokfinIE(InfoExtractor):
|
|
|
|
|
for page_n in itertools.count():
|
|
|
|
|
raw_comments = self._download_json(
|
|
|
|
|
f'{_API_BASE_URL}comment?postId={video_id[5:]}&page={page_n}&size=50',
|
|
|
|
|
video_id, note=f'Downloading viewer comments page {page_n + 1}{format_field(pages_total, template=" of %s")}',
|
|
|
|
|
video_id, note=f'Downloading viewer comments page {page_n + 1}{format_field(pages_total, None, " of %s")}',
|
|
|
|
|
fatal=False) or {}
|
|
|
|
|
|
|
|
|
|
for comment in raw_comments.get('content') or []:
|
|
|
|
@ -318,7 +318,7 @@ class RokfinChannelIE(RokfinPlaylistBaseIE):
|
|
|
|
|
data_url = f'{_API_BASE_URL}post/search/{tab}?page={page_n}&size=50&creator={channel_id}'
|
|
|
|
|
metadata = self._download_json(
|
|
|
|
|
data_url, channel_name,
|
|
|
|
|
note=f'Downloading video metadata page {page_n + 1}{format_field(pages_total, template=" of %s")}')
|
|
|
|
|
note=f'Downloading video metadata page {page_n + 1}{format_field(pages_total, None, " of %s")}')
|
|
|
|
|
|
|
|
|
|
yield from self._get_video_data(metadata)
|
|
|
|
|
pages_total = int_or_none(metadata.get('totalPages')) or None
|
|
|
|
@ -369,7 +369,7 @@ class RokfinSearchIE(SearchInfoExtractor):
|
|
|
|
|
for page_number in itertools.count(1):
|
|
|
|
|
search_results = self._run_search_query(
|
|
|
|
|
query, data={'query': query, 'page': {'size': 100, 'current': page_number}},
|
|
|
|
|
note=f'Downloading page {page_number}{format_field(total_pages, template=" of ~%s")}')
|
|
|
|
|
note=f'Downloading page {page_number}{format_field(total_pages, None, " of ~%s")}')
|
|
|
|
|
total_pages = traverse_obj(search_results, ('meta', 'page', 'total_pages'), expected_type=int_or_none)
|
|
|
|
|
|
|
|
|
|
for result in search_results.get('results') or []:
|
|
|
|
|