as an example, i have a super-market website and there s a section showing market's stores. for choosing locations a dropdown list exists.
What i am trying to do is based on my choice from dropdown list i want to get quantities of stores (blue frame).
here s picture;
I accomplished getting values from dropdown list by this code:
import requests
from bs4 import BeautifulSoup
url="https://www.migros.com.tr/en-yakin-migros"
r=requests.get(url)
ht=r.content
soup=BeautifulSoup(ht,"html.parser")
soup= soup.find("div",class_="stores-selection-container stores-city-select address-part")
items=soup.select("option[value]")
#values=[item.get("value") for item in items]
cities=[item.text for item in items]
del cities[0] #first index is empty and removed
after that, I am stucked. what I want is telling the computer to select the city (from citys list) from dropdown and then getting number (blue frame)
I'd be grateful if you tell me the path that i need to take.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…