Python: urllib/urllib2/httplib confusion

后端 未结 8 1850
长情又很酷
长情又很酷 2020-12-04 07:01

I\'m trying to test the functionality of a web app by scripting a login sequence in Python, but I\'m having some troubles.

Here\'s what I need to do:

  1. D
8条回答
  •  攒了一身酷
    2020-12-04 07:36

    Besides the fact that you may be missing a cookie, there might be some field(s) in the form that you are not POSTing to the webserver. The best way would be to capture the actual POST from a web browser. You can use LiveHTTPHeaders or WireShark to snoop the traffic and mimic the same behaviour in your script.

提交回复
热议问题