handle spaces oops

This commit is contained in:
Lynne Megido 2018-10-27 23:39:52 +10:00
parent 6555cc9c9e
commit adba7ca14b
Signed by: lynnesbian
GPG key ID: FB7B970303ACE499

View file

@ -59,7 +59,7 @@ class ReplyListener(mastodon.StreamListener):
toot = "Here's what I found by searching for images with the query \"{}\".".format(q)
else:
result = j['results'][0]
toot = result['title'] + "\n" + result['url'] + "\n" + result['content'] + "\n" + "(Score: {})\nMore results: {}{}".format(result['score'], "https://searx.lynnesbian.space/?q=", q)
toot = result['title'] + "\n" + result['url'] + "\n" + result['content'] + "\n" + "(Score: {})\nMore results: {}{}".format(result['score'], "https://searx.lynnesbian.space/?q=", q.replace(" ", "%20"))
toot = acct + " " + toot
visibility = notification['status']['visibility']