Advertisement
ranveer5289

test2

Jan 15th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from BeautifulSoup import BeautifulSoup, SoupStrainer import time, subprocess, httplib2, re import urllib f = urllib.urlopen("google.com";) lis=[] f.read() http = httplib2.Http() status, response = http.request('google.com';) for link in BeautifulSoup(response, parseOnlyThese=SoupStrainer('a')): if link.has_key('href'): s=str(link['href']) x=link['href'].startswith('google.com';) if x: print s lis.append(s) #print lis for m in lis: data = urllib.urlopen(m).read()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement