http 通讯 问题

Viewed 76

重现步骤

http请求网页数据,没获取的想要的数据内容

期待结果和实际结果

希望获取到网页连接的数据

软硬件版本信息

MPY: soft reboot
CanMV v1.2.2(based on Micropython e00a144) on 2024-12-18; k230_canmv_01studio with K230

错误日志

connect wifi success
wifi network information: ('192.168.6.125', '255.255.255.0', '192.168.6.1', '192.168.6.1')
[(2, 1, 0, '', ('139.196.241.190', 443))] <class 'list'>
http连接地址: ('139.196.241.190', 443)
http返回的数据:
HTTP/1.1 302 Moved Temporarily
Server: nginx/1.23.1
Date: Tue, 25 Feb 2025 11:20:31 GMT
Content-Type: text/html
Content-Length: 145
Connection: close
Location: https://cloudbrain.qingyun-robot.com/api/robot/queryRobotListForUserPortal?pageNum=1&pageSize=10&q

302 Found


nginx/1.23.1 `尝试解决过程`

补充材料

1740482652036.png
image.png

网页链接内容打开显示的实际内容:
image.png

get请求 返回的实际内容:

1740483193073.png

1 Answers

你好,302这种http status code需要自己去实现跳转。或者使用其他得库