I'm Trying To Scrape Values in option tag with css selector but i can't:
I Want to scrape values attribute in option tag for example <option value='i want to scrape this'>text</option>
Here is another Screenshot so you can understand better:
in the option tag i want to scrape values not text
You Can See Here is the option values screenshot:
I Want also to scrape values here:
Here is my code:
cur = driver.find_elements_by_css_selector('#id_currency')
country = driver.find_elements_by_css_selector('search-form-place-country')
items = len(cur)
with open('cur.csv','w') as s:
for i in range(items):
s.write(cur[i].text + ',' + country[i].text + '\n')
Any Help Will Be Appreciated
Thanks!