Mastodon.py icon indicating copy to clipboard operation
Mastodon.py copied to clipboard

mastodon.account_search not working correctly?

Open pdeitel opened this issue 2 years ago • 10 comments

When I try accounts = mastodon.account_search(q='Mastodon') I get back mostly results that don't contain the word "Mastodon" in the account name and the main Mastodon account is not even included in the 40 results that come back. What am I missing?

pdeitel avatar Nov 11 '23 20:11 pdeitel

Which version of Mastodon.py are you using? I'm running a similar query and it appears to be returning the correct results. This is on octodon.social with Mastodon.py 1.8.1.

craigmaloney avatar Nov 11 '23 20:11 craigmaloney

Exact same version.

pdeitel avatar Nov 11 '23 21:11 pdeitel

I am logged into my account through mastodon.social though I don't think that query requires it.

pdeitel avatar Nov 11 '23 21:11 pdeitel

Could you try a different server to see if you have the same results? I tried on another server and can't seem to replicate the same results you're experiencing. The search is reliant on whatever the server returns.

craigmaloney avatar Nov 11 '23 22:11 craigmaloney

Hmmm. So I switched to mastodon.online and used a separate account I have there. Doing the same search did in fact return the main mastodon account on mastodon.social. But it's also returning mostly account names that don't include the word "mastodon."

When I first started experimenting with Mastodon.py earlier this year, this same search would only return accounts with names that included the word I was searching for. strange.

pdeitel avatar Nov 11 '23 22:11 pdeitel

Yeah, that is weird. Wonder if a note to Mastodon.social to ask what's going on is in order?

craigmaloney avatar Nov 11 '23 22:11 craigmaloney

I'll do that.

pdeitel avatar Nov 11 '23 23:11 pdeitel

Closing this as it seems to be more of a weird server specific thing rather than an api impl bug

halcy avatar Feb 11 '24 11:02 halcy

OK. But is it strange that most of the results coming back from multiple servers don't have the search term in the user name?

pdeitel avatar Feb 11 '24 14:02 pdeitel

It is slightly weird, tbh. Can you post a short repro? I will check it out

halcy avatar Feb 11 '24 14:02 halcy