Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user_input = input("Fruit: ")
- web = r.get('http://www.example.com')
- fruits = html.fromstring(web.content)
- blur = fruits.xpath("//option[text() = '{}'.format(user_input) and not(text()[2])]/@value")
- print(blur)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement