Fix bug, some videos not working

This commit is contained in:
pluja 2020-10-05 13:23:52 +02:00
parent 28f155c033
commit ed688ac2ff

View File

@ -204,11 +204,15 @@ def get_video_owner_info(data):
item = get_renderer_key(contents, "videoSecondaryInfoRenderer")
ownerItem = item['owner']['videoOwnerRenderer']
try:
sC = ownerItem['subscriberCountText']['runs'][0]['text']
except:
sC = "Unknown"
ownerInfo = {
"thumbnail": ownerItem['thumbnail']['thumbnails'][0]['url'],
"username": ownerItem['title']['runs'][0]['text'],
"id": ownerItem['title']['runs'][0]['navigationEndpoint']['browseEndpoint']['browseId'],
"suscriberCount":ownerItem['subscriberCountText']['runs'][0]['text']
"suscriberCount":sC
}
return ownerInfo