I'm trying to scrape all the data from this website:
http://www.dartsdatabase.co.uk/PlayerStats.aspx?statKey=1&pg=7
However, I do not know how to iterate through the 'stat' drop-down menu. Each of these options contains a table I need to scrape.
So far I have the following code which lists the options and values associated with each element in the drop-down list:
url = 'http://www.dartsdatabase.co.uk/PlayerStats.aspx'
response = requests.get(url).text
soup = BeautifulSoup(response,"lxml")
drop = soup.find('select',{'name':'stat'}).findAll("option")
options = []
val = []
for i in range(0,len(drop)):
options.append(drop[i].text)
val.append(drop[i]['value'])
Any help would be greatly appreciated!