Auto-translated
I can only advise you to do it manually – I have never spent more than 5-8 hours searching for the hero I need (and that's the maximum; usually, it takes an hour or two). And, to be honest, I still do it manually... Of course, there are some nuances...
PS. And for some reason, everyone ignored the fact that you can use codes in a save to see who's in another tavern. As if no one was interested. Maybe someone didn't understand what I was talking about, but if they did and are silent? That raises some suspicions. You can also look in your own tavern. With my "Axe-digger," I could have dug up whoever I needed in five minutes. But the "Hero-digger" fits the rules, but it doesn't work for me. And the "Axe-digger" doesn't fit the rules