Bitcoin Blockchain Parser to get all block headers
I share a small Python script that can parse off-line the data which is stored in blk*.dat files.

You can try it here.

If you want, you can turn-off the strings savings that you does not need.