aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-05-22 02:39:15 +0600
committerSergey M․ <dstftw@gmail.com>2016-05-22 02:39:15 +0600
commit92d221ad4858a62143ce5645c56261b26023308e (patch)
tree0c41aecbba01ccf4c9f83478f5037b5c54f00f13
parent0db9a05f88cbbe6709da3875b798634dc536536b (diff)
[periscope] Update uploader_id (Closes #9565)
-rw-r--r--youtube_dl/extractor/periscope.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/extractor/periscope.py b/youtube_dl/extractor/periscope.py
index b2008decc..c23b314e7 100644
--- a/youtube_dl/extractor/periscope.py
+++ b/youtube_dl/extractor/periscope.py
@@ -45,8 +45,11 @@ class PeriscopeIE(InfoExtractor):
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()