📜  如何使用python代码示例打开一个网站

📅  最后修改于: 2022-03-11 14:46:27.243000             🧑  作者: Mango

代码示例5
import urllib.request

try:
   with urllib.request.urlopen('http://www.python.org/') as f:
      print(f.read().decode('utf-8'))
except urllib.error.URLError as e:
   print(e.reason)
print('i thik this is how u do it')