Advertisement
Guest User

Untitled

a guest
Jan 21st, 2011
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. url='http://www.watch-seinfeld-online.com'
  2. req = urllib2.Request(url)
  3. req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
  4. response = urllib2.urlopen(req)
  5. html = response.read()
  6. response.close()
  7. match = re.compile(
  8.                 'a href="(.+?)" title=".+?" class="dd56">(.+?)</a></dt><dt><a '
  9.                 ).findall(html)
  10. for url,name, in match:
  11.     print name, url,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement