mirror of https://gitlab.com/bashrc2/epicyon
Links with payment relationship show the buy button
parent
d1236a1816
commit
54185bfb20
|
@ -2231,6 +2231,11 @@ def get_buy_links(post_json_object: str, translate: {}, buy_sites: {}) -> {}:
|
||||||
'://' not in item['href'] or \
|
'://' not in item['href'] or \
|
||||||
' ' in item['href']:
|
' ' in item['href']:
|
||||||
continue
|
continue
|
||||||
|
if item.get('rel'):
|
||||||
|
if item['rel'] in ('payment', 'donate', 'donation',
|
||||||
|
'buy', 'purchase'):
|
||||||
|
links[site.title()] = item['href']
|
||||||
|
continue
|
||||||
if buy_sites:
|
if buy_sites:
|
||||||
# limited to an allowlist of buying sites
|
# limited to an allowlist of buying sites
|
||||||
for site, buy_domain in buy_sites.items():
|
for site, buy_domain in buy_sites.items():
|
||||||
|
|
Loading…
Reference in New Issue