Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import urllib.request
- zipcode = input("Enter your zip code. ")
- json_string = urllib.request.urlopen("http://www.hebcal.com/shabbat/?cfg=json&geo=zip&m=0&zip=" + zipcode).read()
- info = json.load(json_string)
- for i in json_string["items"]:
- if i["title"].startswith("Candle lighting"):
- candle_lighting = i["date"]
- print(candle_lighting)
- print("According to HebCal Shabbat will start in " + zipcode + " at " + candle_lighting + " PM.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement