mirror of https://gitlab.com/bashrc2/epicyon
More checks on blog citations
parent
74aee7b470
commit
b7f6f4b7a7
|
|
@ -1418,15 +1418,25 @@ def _get_blog_citations_html(box_name: str,
|
||||||
continue
|
continue
|
||||||
if not tag_json.get('type'):
|
if not tag_json.get('type'):
|
||||||
continue
|
continue
|
||||||
|
if not isinstance(tag_json['type'], str):
|
||||||
|
continue
|
||||||
if tag_json['type'] != 'Article':
|
if tag_json['type'] != 'Article':
|
||||||
continue
|
continue
|
||||||
if not tag_json.get('name'):
|
if not tag_json.get('name'):
|
||||||
continue
|
continue
|
||||||
|
if not isinstance(tag_json['name'], str):
|
||||||
|
continue
|
||||||
if not tag_json.get('url'):
|
if not tag_json.get('url'):
|
||||||
continue
|
continue
|
||||||
url_str = get_url_from_post(tag_json['url'])
|
url_str: str = get_url_from_post(tag_json['url'])
|
||||||
citation_url = remove_html(url_str)
|
if not url_str:
|
||||||
citation_name = remove_html(tag_json['name'])
|
continue
|
||||||
|
citation_url: str = remove_html(url_str)
|
||||||
|
if not citation_url:
|
||||||
|
continue
|
||||||
|
citation_name: str = remove_html(tag_json['name'])
|
||||||
|
if not citation_name:
|
||||||
|
continue
|
||||||
citations_str += \
|
citations_str += \
|
||||||
'<li><a href="' + citation_url + '" tabindex="10">' + \
|
'<li><a href="' + citation_url + '" tabindex="10">' + \
|
||||||
'<cite>' + citation_name + '</cite></a></li>\n'
|
'<cite>' + citation_name + '</cite></a></li>\n'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue