Working with older requests lib

I had to change a few lines to make it actually work...