normalize sciencedaily.i2p

main
simp 2025-09-29 21:08:36 +00:00
parent 0275157fd9
commit 5faab2e7ef
1 changed files with 5 additions and 1 deletions

6
app.py
View File

@ -735,6 +735,7 @@ class Irc_bot:
'127.0.0.1:7672',
'localhost',
'localhost:7672',
'sciencedaily.i2p'
]
forbidden = ['#i2p-news-clean']
for i in range(0, entries):
@ -752,7 +753,10 @@ class Irc_bot:
# url_q = msg_url.replace(the_host, shorten)
# msg_url = f'http://{url_q}'
if the_host in switch_urls:
url_q = msg_url.replace(the_host, shorten)
if the_host == 'sciencedaily.i2p':
url_q = msg_url.replace('sciencedaily.i2p/rss', 'sciencedaily.i2p')
else:
url_q = msg_url.replace(the_host, shorten)
if len(url_q) > 7:
url_q = url_q.replace('https://', 'http://')
if url_q[:7] != 'http://':