12

Postman 200 然而 curl 302

 3 years ago
source link: https://www.v2ex.com/t/789661
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

Postman 200 然而 curl 302

  likefly · 13 小时 5 分钟前 · 1060 次点击

我想抓点儿数据,地址是 https://www.uukanshu.com/b/151226/
然而浏览器和 postman 访问没问题,200
用 curl 就不行了,返回一个 302 跳转 404 的页面。

我特意查看了 postmanheader

使用 curl 加上 postmanheader 执行一下

curl -H "User-Agent:PostmanRuntime/7.28.2;Accept:*/*;Host:www.uukanshu.com;Accept-Encoding:gzip, deflate, br;Connection:keep-alive;Cookie:ASP.NET_SessionId=tbugww5w3cqigikqsg2ezvm5; fcip=111" https://www.uukanshu.com/b/151226/

得到如下的返回

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/404.htm">here</a>.</h2>
</body></html>

想请教一下如何解决这个问题呢,目标网站没看懂是如何做的校验,谢谢


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK