how do i set a timeout value for python's mechanize?

后端 未结 3 672
失恋的感觉
失恋的感觉 2021-02-19 03:04

How do i set a timeout value for python\'s mechanize?

3条回答
  •  别那么骄傲
    2021-02-19 03:29

    If you're using Python 2.6 or better, and a correspondingly updated version of mechanize, mechanize.urlopen should accept a timeout=... optional argument which seems to be what you're looking for.

提交回复
热议问题