Skip to content

Commit

Permalink
Add search for user #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Scobiform committed Apr 20, 2024
1 parent 56923c1 commit 3ebbf18
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,8 @@ async def search():
)

try:
results = mastodon.account_search(query, limit=4200)
results = mastodon.account_search(query, limit=420)

# Filter results for same instance as user
results = [result for result in results if re.search(r"//([^/@]+)", result['url']).group(1) == instance]
# Filter results for indexable accounts
#results = [result for result in results if result['indexable'] == True]


return jsonify(results)
except Exception as e:
return jsonify({'error': str(e)}), 500
Expand Down

0 comments on commit 3ebbf18

Please sign in to comment.