1
パスワードと認証コードを加えた1つのユーザー名でのみ動作します。ここで繰り返し送信フォーム
はロジックです:
def start_requests(self):
yield request(indexUrl, headers=headers, callback=self.downloadPic)
def downloadPic(self, response):
# get cookies from the response and add it to the headers
yield request(picUrl, headers=headers, callback=self.handlePic)
def handlePic(self, response):
# extract text from the picture
# form data include username, password and verification code
yield FormRequest(postUrl, formdata, headers=headers, callback=self.parse)
は、我々はローカルでユーザ名とパスワードの多くを持っているとしましょう。そして、私はこのlogocを何回も繰り返すために、formdataのユーザー名とパスワードを変更するだけです。
forループを使用してすべてのユーザー名とパスワードを取得してから新しい要求を生成しようとしましたが、機能しません。
だからアイデアはありますか?