http://ihe.istanbul/satis-noktalari
I would like to scrape the points(latLng) data of the targeted company's dealerships on maps which uses Google Maps api.
I tried to scrape data by using requests_html to render JavaScript on the page of website, then I used to reach the element by using BeautifulSoup.
from bs4 import BeautifulSoup
from requests_html import HTMLSession
# create an HTML Session object
session = HTMLSession()
# Use the object above to connect to needed webpage
resp = session.get("http://ihe.istanbul/satis-noktalari")
# Run JavaScript code on webpage
resp.html.render()
soup = BeautifulSoup(resp.html.html, "lxml")
html_content = soup.contents[1]
_script = html_content.find_all("script")[23]
print(_script)
Therefore, the print lead me to a way that I can see the desired area where I can find the latLng point values if the click event is triggered.
However, the website's url cannot renew itself and put a tag for selected zone of the city.
To explain myself in a clear way, I created two pictures that show exactly what I want to do:
This output shows the result which there is no selected city:

This is the triggered click event which shows the desired result:

If url could be updated after trigger JavaScript event via Google Maps api, I could use the url. How can I trigger it via using Python, or how can I scrape the triggered data by using Python? The Python code I provide shows non triggered event.