How to load all APIs in python which get triggered when webpage loads?

Viewed 47

I am trying web scrape following website: https://gomechanic.in/noida/car-repair/maruti-suzuki-swift/petrol . I have also got the api which is giving data: https://gomechanic.app/api/v2/oauth/customer/get-services-details-by-category?car_id=135&city_id=1&category_id=0&user_car_id=null . Only problem is that, in API link, instead of carName and cityName, I have to give carId and cityId. I have do it for all possible combinations of cities and cars so I can't do it manually. I only have carNames and cityIds with me. I can run a for loop for carIds but I also want to know which data is for which car. Is there any way I can solve this?

I can solve this problem if somehow I can load all the API which were called when webpage loads. Is this possible in python or is there any other way to solve this?

0 Answers
Related