|
最近上线的百读版gpt已上线 https://chat.baidu.com/
数据请求的也是抄袭的openai的
Request URL: https://chat-ws.baidu.com/aichat/api/conversation
{"message":{"inputMethod":"keyboard","isRebuild":false,"lastMsgId":"205d8e14-38ed-47b9-9126-32e6e9560bb4","lastMsgIndex":1,"content":{"query":"鱼香肉丝的做法","qtype":0,"customes":[],"botQuery":{},"autoQuery":false,"pageInfo":{},"containerInfo":{"containerType":0,"isDegrade":0}}},"sessionId":"43d95fc2-b94f-442f-9c5b-b8078f712862","aisearchId":"8910502382892615205","pvId":"8756687881720980976","newTopic":false}
就想自己也搞一个套壳,数据就用百度的(主要是政策方面百度肯定更安全),但无奈技术菜鸡,不知道怎么用php获取到这个页面的内容
看到 accept: text/event-stream是这个,别的类型的网页php curl很容易就获取到了,这个是不是很高级啊,求大佬指点下php该怎么抓取这种页面,十分感谢 |
|