def __init__(self, miner): self.miner = miner con = post(self.miner.url, headers=self.miner.headers, payload=self.miner.payload, auth=self.miner.auth) self.install_handles(con)
def on_redirect(self, con, response): con = post(response.headers['location'], headers=self.miner.headers, payload=self.miner.payload, auth=self.miner.auth) self.install_handles(con)