找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 673|回复: 0

[求助] python爬虫问题,返回值与页面不一致?

1

主题

1

帖子

1

积分

贫民

积分
1
aiyh 发表于 2022-9-15 23:15:52 | 显示全部楼层 |阅读模式
目标网站:https://std.sacinfo.org.cn/home/query?stdCode=GB/T20899.4-2021
def find_standinfo():
    header = {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
              'Accept-Encoding':'gzip, deflate,br',
              'Accept-Language':'zh-CN,zh;q=0.9',
              'Connection':'close',
              'connect-lenght':str(22),
              'connect-type':"application/x-www-form-urlencoded; charset=UTF-8",         
              "origin":"https://std.sacinfo.org.cn",
              "Referer": "https://std.sacinfo.org.cn/home/query?stdCode=GB/T20899.4-2021",
              "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36"
              }
    url = "https://std.sacinfo.org.cn/gstd/queryInfo"
    data ={"buzStdProjectId:121887"}
    webdata = requests.post(url,headers=header,data = data).json()

    print(webdata)

find_standinfo()


返回值为什么和页面显示的不一致??









回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表