import requests url = "http://dc-4/command.php" rsp = r.get(url,allow_redirects=False) print(rsp.text)