Advertisement
Guest User

Untitled

a guest
Mar 5th, 2009
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. import urllib2
  2. import re
  3. from BeautifulSoup import BeautifulSoup
  4.  
  5. page = urllib2.urlopen("http://animemundobr.blogspot.com/2007/11/samurai-x-dublado.html")
  6. soup = BeautifulSoup(page)
  7. links = soup.findAll("a",href=re.compile("http://rapidshare.com/"))
  8. lista = []
  9. for link in links:
  10.     href = link.get('href', None)
  11.     if href:
  12.         lista.append(href)    
  13. f = open("samurai_x_links.txt","w")
  14. f.write('\n'.join(lista))
  15. f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement