#!/usr/bin/python3 import requests try: r = requests.get("http://google.de"); if r.status_code == 200: r.encoding = 'utf-8' print(r.text) else: print(r.status_code) except Exception as exp: print("Error: " + str(exp))