I'm trying to call the API of a website using the following code:
from seleniumrequests import Firefox
driver = Firefox()
driver.get("https://www.itftennis.com/en/tournament-calendar/mens-world-tennis-tour-calendar/?categories=All&startdate=2024-01")
driver.request(
method="POST",
url="https://www.itftennis.com/tennis/api/TournamentApi/GetDrawsheet",
json={
"tournamentId": 1100193157,
"tourType": "N",
"weekNumber": 0,
"matchTypeCode": "S",
"eventClassificationCode": "M",
},
)
In the browser window it seems to be trying to load http://127.0.0.1:56330/ which doesn't seem right.
There is a similar issue here however @cryzed puts this down to a firewall issue. That's not the case here as the first get request works just fine.
Any ideas what might be going awry?
Supporting details:
MacOS Sonoma
python: 3.11
selenium-requests: 2.0.3
selenium: 4.17.12
requests: 2.31.0