请用代码帮助我更正此问题:
import urllib.request
import urllib.parse
def read_text():
quotes= open("C:\\Users\\no1\\Desktop\\movie_quotes.txt")
content_of_file=quotes.read()
quotes.close()
check_profanity(content_of_file)
def check_profanity(text_to_check):
a=urllib.parse.urlencode(text_to_check)
a=a.encode('utf-8')
connection=urllib.request.urlopen("http://www.wdyl.com/profanity?q=",a)
output=connection.read()
print(output)
connection.close()
read_text()
我想查查亵渎的内容,但密码不起作用。在
以下是python的反馈:
^{pr2}$
在www.wdyl.com网站不起作用了。在
你可以用你喜欢的代替: http://www.wdylike.appspot.com/?q=foo
这是我的工作代码:
另一种方法是:
相关问题 更多 >
编程相关推荐