Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. import bs4
  2. import requests
  3.  
  4. #amount = input("Amount> ")
  5. #from_ = input("From (ie USD)> ")
  6. #to = input("To> ")
  7. amount = 1
  8. from_ = "USD"
  9. to = "NOK"
  10. url = "http://www.xe.com/currencyconverter/convert/?Amount={0}&From={1}&To={2}".format(amount, from_, to)
  11. res = requests.get(url)
  12. soup = bs4.BeautifulSoup(res.text)
  13. result = soup.select(".uccResultAmount")
  14. print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement