mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-30 19:45:06 +00:00
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', '') != '':
|
if jent.get('caption', '') != '':
|
||||||
description += ' - ' + jent.get('caption')
|
description += ' - ' + jent.get('caption')
|
||||||
thumbnail = None
|
thumbnail = None
|
||||||
if jent.has_key('image'):
|
if jent.get('image') is not None:
|
||||||
thumbnail = jent['image'].get('href')
|
thumbnail = jent['image'].get('href')
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
|
@ -514,7 +514,7 @@ class BBCNewsIE(BBCCoUkIE):
|
||||||
|
|
||||||
if programme_id:
|
if programme_id:
|
||||||
formats, subtitles = self._download_media_selector(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
|
# mediaselector not used at
|
||||||
# http://www.bbc.com/turkce/haberler/2015/06/150615_telabyad_kentin_cogu
|
# http://www.bbc.com/turkce/haberler/2015/06/150615_telabyad_kentin_cogu
|
||||||
for key, val in jent['sourceFiles'].items():
|
for key, val in jent['sourceFiles'].items():
|
||||||
|
@ -536,8 +536,8 @@ class BBCNewsIE(BBCCoUkIE):
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
id = jent.get('id') if programme_id == None else programme_id
|
id = jent.get('id') if programme_id is None else programme_id
|
||||||
if id == None:
|
if id is None:
|
||||||
id = 'NA'
|
id = 'NA'
|
||||||
|
|
||||||
ret.append({
|
ret.append({
|
||||||
|
|
Loading…
Reference in a new issue