0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-27 03:03:01 +00:00

[periscope] Update uploader_id (Closes #9565)

This commit is contained in:
Sergey M․ 2016-05-22 02:39:15 +06:00
parent 0db9a05f88
commit 92d221ad48
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -45,8 +45,11 @@ def _real_extract(self, url):
broadcast = broadcast_data['broadcast']
status = broadcast['status']
uploader = broadcast.get('user_display_name') or broadcast_data.get('user', {}).get('display_name')
uploader_id = broadcast.get('user_id') or broadcast_data.get('user', {}).get('id')
user = broadcast_data.get('user', {})
uploader = broadcast.get('user_display_name') or user.get('display_name')
uploader_id = (broadcast.get('username') or user.get('username') or
broadcast.get('user_id') or user.get('id'))
title = '%s - %s' % (uploader, status) if uploader else status
state = broadcast.get('state').lower()