[已解决] urllib.error.HTTPError: HTTP Error 400: Invalid header received from client的解决方案
来自Udacity的冒犯语检测的实验
右边这段代码用python2.7可以运行,python3就会报错
如何解决? 如下:
原代码:
def check_profanity(text_to_check):
connection = ur.urlopen(
"http://www.wdylike.appspot.com/?q=" + text_to_check)
o...
原创
2019-07-15 17:29:41 ·
11010 阅读 ·
0 评论