add option for remote urls, write directly to stdout for python 2