http.server服务端post请求接收图片无法识别

req_datas = self.rfile.read(int(self.headers['content-length']))
pattern1 = re.compile(b"-+\w*\s{2}(.*?\s{2}){2}\s{2}")
pattern2 = re.compile(b"\s{2}-+.+\s{2}")
res1 = re.match(pattern1, req_datas)
res2 = re.search(pattern2, req_datas)
file_data = req_datas[res1.end():res2.start()]
with open("qqq.jpg", "wb") as w:
w.write(file_data)
上一篇:CNN-简单图片分类


下一篇:laravel+容联.云通讯 实现手机短信验证用户注册