if response.status_code == 200: print(response.text) else: print('Failed to fetch URL') Using curl from the command line: