Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2012
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. import re
  2. from urllib.request import urlopen
  3.  
  4. url         = "http://www.hackthissite.org"
  5. quotes      = []
  6. quote_regex = re.compile(b"<blockquote>(.*?)</blockquote>")
  7.  
  8. while True:
  9.     quote = quote_regex.search(urlopen(url).read())
  10.     quote = quote.group(1).decode("utf-8")
  11.     if quote not in quotes:
  12.         quotes.append(quote)
  13.         print(quote + "\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement