mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-03 03:48:31 +00:00
updated ruff changes
This commit is contained in:
parent
086bf07eab
commit
edab6f9e9a
@ -10,8 +10,8 @@
|
|||||||
parse_qs,
|
parse_qs,
|
||||||
traverse_obj,
|
traverse_obj,
|
||||||
try_get,
|
try_get,
|
||||||
write_string,
|
|
||||||
urlencode_postdata,
|
urlencode_postdata,
|
||||||
|
write_string,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ def _entries(self, query, url):
|
|||||||
current_page_query['from'] = 0
|
current_page_query['from'] = 0
|
||||||
|
|
||||||
for page_num in itertools.count(1):
|
for page_num in itertools.count(1):
|
||||||
self.write_debug(f"Querying API page {page_num} with params: {current_page_query}")
|
self.write_debug(f'Querying API page {page_num} with params: {current_page_query}')
|
||||||
results = self._call_api(
|
results = self._call_api(
|
||||||
'search', None, current_page_query, url,
|
'search', None, current_page_query, url,
|
||||||
f'Downloading search JSON page {page_num}')
|
f'Downloading search JSON page {page_num}')
|
||||||
@ -161,13 +161,9 @@ def _entries(self, query, url):
|
|||||||
self.write_debug(
|
self.write_debug(
|
||||||
'sectionList[0] exists but has no "items" key. '
|
'sectionList[0] exists but has no "items" key. '
|
||||||
'Using items, total, and size from root of results (if available).')
|
'Using items, total, and size from root of results (if available).')
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.write_debug('No sectionList found. Using items, total, and size from root of results.')
|
self.write_debug('No sectionList found. Using items, total, and size from root of results.')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
items = items_data_source.get('items')
|
items = items_data_source.get('items')
|
||||||
if not items or not isinstance(items, list):
|
if not items or not isinstance(items, list):
|
||||||
self.write_debug(f'No "items" list found in {source_name_for_debug}.')
|
self.write_debug(f'No "items" list found in {source_name_for_debug}.')
|
||||||
|
Loading…
Reference in New Issue
Block a user