标签:class decode split str pre htm span int html
header, html = data.split(b‘\r\n\r\n‘, 1)
print(header.decode(‘utf-8‘))
# 把接收的数据写入文件:
with open(‘sina.html‘, ‘wb‘) as f:
f.write(html)
标签:class decode split str pre htm span int html
原文地址:https://www.cnblogs.com/LewisAAA/p/9248077.html