mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 08:19:57 +01:00
bbc.py: correct syntax
This commit is contained in:
parent
36da48798a
commit
a3bfddfa5e
@ -506,7 +506,7 @@ def _real_extract(self, url):
|
||||
if jent.get('caption', '') != '':
|
||||
description += ' - ' + jent.get('caption')
|
||||
thumbnail = None
|
||||
if jent.has_key('image'):
|
||||
if jent.get('image') is not None:
|
||||
thumbnail = jent['image'].get('href')
|
||||
|
||||
formats = []
|
||||
@ -514,7 +514,7 @@ def _real_extract(self, url):
|
||||
|
||||
if programme_id:
|
||||
formats, subtitles = self._download_media_selector(programme_id)
|
||||
elif jent.has_key('sourceFiles'):
|
||||
elif jent.get('sourceFiles') is not None:
|
||||
# mediaselector not used at
|
||||
# http://www.bbc.com/turkce/haberler/2015/06/150615_telabyad_kentin_cogu
|
||||
for key, val in jent['sourceFiles'].items():
|
||||
@ -536,8 +536,8 @@ def _real_extract(self, url):
|
||||
|
||||
self._sort_formats(formats)
|
||||
|
||||
id = jent.get('id') if programme_id == None else programme_id
|
||||
if id == None:
|
||||
id = jent.get('id') if programme_id is None else programme_id
|
||||
if id is None:
|
||||
id = 'NA'
|
||||
|
||||
ret.append({
|
||||
|
Loading…
Reference in New Issue
Block a user