【问题标题】:Python Mechanize response on submitPython Mechanize 提交时的响应
【发布时间】:2014-11-19 10:22:03
【问题描述】:

我正在尝试在 Mechanize 中填写表格并打印其响应页面,但是当我使用 browser.reponse() 时,我得到了响应

<response_seek_wrapper at 0x21f0648 whose wrapped object = <closeable_response at 0x21fc3a0 whose fp = <socket._fileobject object at 0x021EDD70>>>

如何打印我收到的 html 作为响应?

【问题讨论】:

    标签: python mechanize-python


    【解决方案1】:

    我认为 browser.response().read() 会返回你所期望的结果。

    来源:http://www.pythonforbeginners.com/cheatsheet/python-mechanize-cheat-sheet

    【讨论】:

      猜你喜欢
      • 2017-04-06
      • 2016-01-19
      • 2014-04-12
      • 2012-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-18
      相关资源
      最近更新 更多