We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
本周任务如下:
The text was updated successfully, but these errors were encountered:
大家复现“第六章作业内容”中内容时,按照ppt第七页修改后执行scrapy crawl itcast时如果报错 open(filename, 'w').write(response.body) TypeError: write() argument must be str, not bytes 可以将parse()中的open(filename, 'w').write(response.body)的打开文件方式改成‘wb’,从而将byte输出。 可运行代码: def parse(self, response): filename = "teacher .html" open(filename, 'wb').write(response.body)
open(filename, 'w').write(response.body)
TypeError: write() argument must be str, not bytes
def parse(self, response):
filename = "teacher .html"
open(filename, 'wb').write(response.body)
Sorry, something went wrong.
No branches or pull requests
本周任务如下:
The text was updated successfully, but these errors were encountered: