1
0
mirror of https://github.com/l1ving/youtube-dl synced 2020-11-18 19:53:54 -08:00

[twitter] Reduce crashes

There's an issue with the twitter livestream not having a proper title, like in my example here. My fix fixes this. https://gist.github.com/NGTmeaty/86540090b3410febf3d2734f53f7a266
This commit is contained in:
NGTmeaty 2020-06-01 02:33:55 -04:00 committed by GitHub
parent bef4688c72
commit 8fe398d8b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ class PeriscopeBaseIE(InfoExtractor):
item_id, query=query)
def _parse_broadcast_data(self, broadcast, video_id):
title = broadcast['status']
title = broadcast.get('status')
uploader = broadcast.get('user_display_name') or broadcast.get('username')
title = '%s - %s' % (uploader, title) if uploader else title
is_live = broadcast.get('state').lower() == 'running'