mirror of https://gitlab.com/bashrc2/epicyon
Getting donation links without fluff
parent
ce69d66739
commit
34e8453fd5
14
donate.py
14
donate.py
|
@ -62,12 +62,14 @@ def get_donation_url(actor_json: {}) -> str:
|
||||||
continue
|
continue
|
||||||
if not property_value['type'].endswith('PropertyValue'):
|
if not property_value['type'].endswith('PropertyValue'):
|
||||||
continue
|
continue
|
||||||
if '<a href="' not in property_value[prop_value_name]:
|
if '<a href="' in property_value[prop_value_name]:
|
||||||
continue
|
donate_url = property_value[prop_value_name].split('<a href="')[1]
|
||||||
donate_url = property_value[prop_value_name].split('<a href="')[1]
|
if '"' in donate_url:
|
||||||
if '"' in donate_url:
|
donate_url = donate_url.split('"')[0]
|
||||||
donate_url = donate_url.split('"')[0]
|
donate_url = remove_html(donate_url)
|
||||||
donate_url = remove_html(donate_url)
|
return remove_link_tracking(donate_url)
|
||||||
|
else:
|
||||||
|
donate_url = remove_html(property_value[prop_value_name])
|
||||||
return remove_link_tracking(donate_url)
|
return remove_link_tracking(donate_url)
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue