https://app.disclosures.io/link/1482-Nightshade-Road-31-0ax3eu92
此網址的form沒有action,如何使用requests送出表單呢?
目前寫法不知使用get有沒有錯?
import requests
from bs4 import BeautifulSoup
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36'}
Name = ['Kevin','Elvis']
Email = ['kevinabcd@gmail.com','elvis1234@gmail.com']
Phone = ['(913) 585-4402',"(913) 585-4402"]
url = 'https://app.disclosures.io/link/1482-Nightshade-Road-31-0ax3eu92'
for i in range(2):
resp = requests.get(url,headers=headers ,params={
'input-role':'Buyer Agent',
'input-name':Name[i],
'input-email':Email[i],
'input-phone':Phone[i]})
print(resp.url)