I put an empty bottle on the counter with apple cider vinegar in it -then take a paper plate and form a funnel - tape it to the bottle so there's a good seal. Fruit flies get in but they can't get out.
Might try beer next time - seems pretty humane to me!