def __init__(self, account, pin, browser=None):
"""
In some occasions where you'll make a number of requests
to the server, you will want to store the mechanize browser
object in some cache so it can be reused.
This has the advantage of reducing the number of requests
necessary to complete given tasks.
The browser object can simply be created this way:
> browser = mechanize.Browser()
"""
self.account = account
self.pin = pin
self.br = browser or mechanize.Browser()
self.br.set_handle_robots(False)
评论列表
文章目录