I have to scrap the quotes data from an insurance company website which requires filling the form which has 12-14 fields and clicking on a button and wait for 14-16 seconds to get the results and once results are available, return them to REST API. I used python and selenium to open the chrome browser when I receive the request for API, fill the UI elements from API request parameter and once quote is available, returned it. Everything works for 1 request at a time but when I did a load test with 100 parallel requests which opened 100 browser windows and it crashed, only processed 5 requests.
I have a virtual machine with 200 GB of RAM and powerful CPU but it did not work there either. I have to open the browser which seems like a problem to me. What alternative or solution can I use as we have a benchmark of 1000 parallel requests at a time. For static data scrapping I worked in the past and that's an easy job but with dynamic content there are problems. Anyone who faced such issues or worked previously please share what's the best path for this. I am thinking of using multiple virtual machines and redirect requests to them accordingly but I'm not sure if that's a good path or not. There are tools like Microsoft Power Automate, UiPath etc. but I'm not sure if they can handle my use case or not. I have already spent a week to create this scraping script but from results it seems like there has to some other path.