How to get bone location on each frame and print it 2.8
scene.frame_set(f)


is very performance-hungry to do in the script for each frame. I'd suggest reading the data of evaluated FCurves for bones directly. 

E.g. this will evaluate the FCurve Y value at frame 7. For exporting animation, you only need to evaluate keyframes.

object.animation_data.action.fcurves[1].evaluate(7)