Closed Mill1893 closed 4 years ago
The thought process was if people asked for the same image multiple times they'd get different results.
Making them have a little more variety.
I'll have to look into how many requests we're getting back with each request. If we're getting hundreds of potential images, we could probably narrow it down to the top 10 and still be able to get some variety.
We can specify the count. Both bing and google are hard coded to 10 at the moment: https://github.com/Splyth/slack_bot/blob/master/lisa_commands/request_helper.py#L123 https://github.com/Splyth/slack_bot/blob/master/lisa_commands/request_helper.py#L106
Yeah I just saw that, I'm looking at a way to maybe narrow down results for a more specific query (removing duplicates, specifying specific image types, etc.)
I think picking from the top 3 might work (maybe top 5 at most?). Should cut down on the nonsense results while still giving a bit of variety. call the cops
should probably pick from the top 10 at least, and youtube me
should probably only pick the top result, since I think most queries to it are looking for a specific video.
I'm going to lower the limits for now and see if that helps. https://github.com/Splyth/slack_bot/pull/44
I've done the following: weighted google searches in favor of videogames, anime, and memes added various meme sites to bing searches.
Lisa appears to be giving more correct results.
Can reopen if people believe this is still an issue
Image picking is done at random, should pick the first result for better accuracy.