Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import urllib
  2. import re
  3. htmlfile=urllib.urlopen("http://forecast.weather.gov/product.php?site=NWS&issuedby=FWD&product=RR5&format=CI&version=1&glossary=0")
  4. htmltext=htmlfile.read()
  5. regex='<pre class="glossaryProduct">(.+?)</pre>'
  6. pattern=re.compile(regex)
  7. out=re.findall(pattern, htmltext)
  8. print (out)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement