mirror of https://gitlab.com/bashrc2/epicyon
Check for string type
parent
0366577e8b
commit
19c6c55b46
|
@ -2233,10 +2233,11 @@ def get_buy_links(post_json_object: str, translate: {}, buy_sites: {}) -> {}:
|
|||
' ' in item['href']:
|
||||
continue
|
||||
if item.get('rel'):
|
||||
if item['rel'] in ('payment', 'donate', 'donation',
|
||||
'buy', 'purchase'):
|
||||
links[item_name] = item['href']
|
||||
continue
|
||||
if isinstance(item['rel'], str):
|
||||
if item['rel'] in ('payment', 'donate', 'donation',
|
||||
'buy', 'purchase'):
|
||||
links[item_name] = item['href']
|
||||
continue
|
||||
if buy_sites:
|
||||
# limited to an allowlist of buying sites
|
||||
for site, buy_domain in buy_sites.items():
|
||||
|
|
Loading…
Reference in New Issue