bbc.py: correct syntax
This commit is contained in:
parent
36da48798a
commit
a3bfddfa5e
1 changed files with 53 additions and 53 deletions
|
@ -506,7 +506,7 @@ class BBCNewsIE(BBCCoUkIE):
|
|||
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 @@ class BBCNewsIE(BBCCoUkIE):
|
|||
|
||||
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 @@ class BBCNewsIE(BBCCoUkIE):
|
|||
|
||||
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 a new issue