Advertisement
Guest User

Untitled

a guest
Feb 24th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. user_input = input("Fruit: ")
  2.  
  3. web = r.get('http://www.example.com')
  4.     fruits = html.fromstring(web.content)
  5.     blur = fruits.xpath("//option[text() = '{}'.format(user_input) and not(text()[2])]/@value")
  6.     print(blur)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement