我试图从一个假邮箱提供商10minutemail 中删除一些信息,就像一个 for 循环一样,直到它获取 JSON 内容(收到的电子邮件),同时获取该邮箱的电子邮件地址字符串。这就是我所做的:
box_url = 'https://10minutesemail.net/getInbox'
address_infos = 'https://10minutesemail.net/getEmailAddress'
address_request = requests.post(address_infos)
address_data = address_request.json()
# the email address string
mail_address = str(address_data['address'])
print(mail_address)
# recovery code string
reco_key = str(address_data['recover_key'])
# cookies request
#cookies req
session = requests.Session()
session.get(address_infos)
cookies = session.cookies.get_dict()
print(cookies)
#box req
cookies_req = requests.post(box_url,cookies=cookies).content
print(cookies_req)
我抓取了我需要的全部信息,但是,我需要将它们放入循环中,并在同一个请求中相互匹配 cookie 和地址,以便为每个地址收到我的电子邮件。谢谢