Created
May 7, 2015 17:05
-
-
Save cuevasclemente/21bf5c2b2f1aefb183ce to your computer and use it in GitHub Desktop.
Weather App in Nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httpclient | |
import strutils | |
import re | |
var resp = get(url = "http://forecast.weather.gov/MapClick.php?zoneid=NYZ075&TextType=1") | |
var text = resp.body | |
for line in splitlines(text): | |
if line[0..2] == "<b>" or line[0..7] == "</table>": | |
echo(line.replace(re"\<.*?>"), "\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment