rony2605

Le o conteudo da pagina do fornecedor

Mar 16th, 2013
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import urllib.request
  2.  
  3. def get_prince():
  4.     page = urllib.request.urlopen("http://beans.itcarlow.ie/prices.html")
  5.     text = page.read().decode("utf8")
  6.     where = text.find('>$')
  7.     start_of_price = where + 2
  8.     end_of_price = start_of_price + 4
  9.     print(text[start_of_price:end_of_price])
  10. get_prince()
RAW Paste Data