kopia lustrzana https://github.com/wagtail/wagtail
Embeds: Save author_name and provider_name if set
rodzic
a771e6adc4
commit
db5559b688
|
@ -77,7 +77,9 @@ def embedly(url, max_width=None, key=None):
|
|||
|
||||
# Return embed as a dict
|
||||
return {
|
||||
'title': oembed['title'],
|
||||
'title': oembed['title'] if 'title' in oembed else '',
|
||||
'author_name': oembed['author_name'] if 'author_name' in oembed else '',
|
||||
'provider_name': oembed['provider_name'] if 'provider_name' in oembed else '',
|
||||
'type': oembed['type'],
|
||||
'thumbnail_url': oembed.get('thumbnail_url'),
|
||||
'width': oembed.get('width'),
|
||||
|
@ -114,7 +116,9 @@ def oembed(url, max_width=None):
|
|||
|
||||
# Return embed as a dict
|
||||
return {
|
||||
'title': oembed['title'],
|
||||
'title': oembed['title'] if 'title' in oembed else '',
|
||||
'author_name': oembed['author_name'] if 'author_name' in oembed else '',
|
||||
'provider_name': oembed['provider_name'] if 'provider_name' in oembed else '',
|
||||
'type': oembed['type'],
|
||||
'thumbnail_url': oembed.get('thumbnail_url'),
|
||||
'width': oembed.get('width'),
|
||||
|
|
Ładowanie…
Reference in New Issue