mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 20:33:19 +00:00
flake8 check
This commit is contained in:
parent
e2ae76e84c
commit
4b9a54b464
|
@ -1270,7 +1270,7 @@ def extract_all(pattern):
|
||||||
|
|
||||||
def parse_model(model):
|
def parse_model(model):
|
||||||
'''Extract single video from model structure'''
|
'''Extract single video from model structure'''
|
||||||
if(type(model) == list):
|
if isinstance(model, list):
|
||||||
model = model[0]
|
model = model[0]
|
||||||
item_id = traverse_obj(model, ('versions', 0, 'versionId', {str}))
|
item_id = traverse_obj(model, ('versions', 0, 'versionId', {str}))
|
||||||
if not item_id:
|
if not item_id:
|
||||||
|
@ -1285,10 +1285,10 @@ def parse_model(model):
|
||||||
'thumbnail': ('imageUrl', {lambda u: urljoin(url, u.replace('$recipe', 'raw'))}),
|
'thumbnail': ('imageUrl', {lambda u: urljoin(url, u.replace('$recipe', 'raw'))}),
|
||||||
'description': (
|
'description': (
|
||||||
'synopses', ('long', 'medium', 'short'), {str}, any),
|
'synopses', ('long', 'medium', 'short'), {str}, any),
|
||||||
'duration': ('versions', 0, 'duration', {int}),
|
'duration': ('versions', 0, 'duration', {int}),
|
||||||
'timestamp': ('versions', 0, 'availableFrom', {lambda x: int_or_none(x, scale=1000)}),
|
'timestamp': ('versions', 0, 'availableFrom', {lambda x: int_or_none(x, scale=1000)}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
# US accessed article with single embedded video (e.g.
|
# US accessed article with single embedded video (e.g.
|
||||||
# https://www.bbc.com/news/uk-68546268)
|
# https://www.bbc.com/news/uk-68546268)
|
||||||
|
|
Loading…
Reference in a new issue