reimplement urlopen() on top of librepo