Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import json
  2. import urllib.request
  3.  
  4. zipcode = input("Enter your zip code. ")
  5. json_string = urllib.request.urlopen("http://www.hebcal.com/shabbat/?cfg=json&geo=zip&m=0&zip=" + zipcode).read()
  6. info = json.load(json_string)
  7. for i in json_string["items"]:
  8. if i["title"].startswith("Candle lighting"):
  9. candle_lighting = i["date"]
  10. print(candle_lighting)
  11. print("According to HebCal Shabbat will start in " + zipcode + " at " + candle_lighting + " PM.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement