-3
我试图让我的程序读取用户插入的网站。我的错误可能非常愚蠢,因为我有点新手,但我无法在任何地方找到答案。为什么urllib不能使用我的python代码?
这是我写的:
def open_website():
website = input("Hello, enter website")
import webbrowser
webbrowser.open(website)
find_words()
def find_words():
import urllib
web_read = urllib.urlopen(website)
text = web_read.read()
print (text)
open_website()
你忘了告诉我们你收到了什么错误,包括完整的回溯。 –
程序的输出是什么?怎么了?你投入什么? –