Fix minor formatting issues
This commit is contained in:
parent
d7f934b7b2
commit
0f4bf45cde
@ -301,7 +301,7 @@ def extract_item_info(item, additional_info={}):
|
|||||||
info['id'] = multi_deep_get(item,
|
info['id'] = multi_deep_get(item,
|
||||||
['videoId'],
|
['videoId'],
|
||||||
['navigationEndpoint', 'watchEndpoint', 'videoId'],
|
['navigationEndpoint', 'watchEndpoint', 'videoId'],
|
||||||
['navigationEndpoint', 'reelWatchEndpoint', 'videoId'], # shorts
|
['navigationEndpoint', 'reelWatchEndpoint', 'videoId'] # shorts
|
||||||
)
|
)
|
||||||
info['view_count'] = extract_int(item.get('viewCountText'))
|
info['view_count'] = extract_int(item.get('viewCountText'))
|
||||||
|
|
||||||
@ -322,8 +322,8 @@ def extract_item_info(item, additional_info={}):
|
|||||||
else:
|
else:
|
||||||
info['approx_view_count'] = extract_approx_int(multi_get(item,
|
info['approx_view_count'] = extract_approx_int(multi_get(item,
|
||||||
'shortViewCountText',
|
'shortViewCountText',
|
||||||
'viewCountText') # shorts
|
'viewCountText' # shorts
|
||||||
)
|
))
|
||||||
|
|
||||||
# handle case where it is "No views"
|
# handle case where it is "No views"
|
||||||
if not info['approx_view_count']:
|
if not info['approx_view_count']:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user