Skip to content

挂号失败,post 的 response 是一个 html #27

@coeusite

Description

@coeusite

遇到一个BUG,挂号时的 response 不是 json 而是一个 html
bjguahao.py > get_it() > response = self.browser.post(self.confirm_url , data=preload)

尝试测试了一下,结果弄得我自己一头雾水。

在 Chrome 上手动挂号,挂号时同样是

dutySourceId:45004502
hospitalId:122
departmentId:200001019
doctorId:200287869
patientId:**********
hospitalCardId:
medicareCardId:
reimbursementType:-1
smsVerifyCode:763466
childrenBirthday:
isAjax:true
  • 返回值如下:
code:200
data:******
hasError:false
msg:"OK"

用脚本挂同一个号,post 的数据基本一致,除了SMS码和reimbursementType,但返回值的response.text却是个HTML,且挂号不成功。
response.text写入文件后发现是选择时间的那个挂号页。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions