Try one of these:-
Check out USB Flytrap Rechargeable Automatic Pest Catche...at 32% off!฿144.84 only!Get it on Lazada now! | https://s.lazada.co.th/s.jNYUl
My friend had a similar one, mains powered and a lot heavier, but worked on the same principle. It worked brilliantly, having to be emptied several times a day in the fertiliser season. His cat knocked it off the counter and smashed it, I have never seen the same one for sale since. Having said that, there has never been quite the same need since...the fly population was decimated!