Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib
- import re
- htmlfile=urllib.urlopen("http://forecast.weather.gov/product.php?site=NWS&issuedby=FWD&product=RR5&format=CI&version=1&glossary=0")
- htmltext=htmlfile.read()
- regex='<pre class="glossaryProduct">(.+?)</pre>'
- pattern=re.compile(regex)
- out=re.findall(pattern, htmltext)
- print (out)
- import urllib
- file1 = urllib.urlopen('http://forecast.weather.gov/product.php?site=NWS&issuedby=FWD&product=RR5&format=txt&version=1&glossary=0')
- s1 = file1.read()
- print(s1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement