Modified use of requests library