Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from BeautifulSoup import BeautifulSoup
- import urllib2
- import re
- html_page = urllib2.urlopen("http://kteq.in/services")
- soup = BeautifulSoup(html_page)
- for link in soup.findAll('a'):
- result = re.sub(r"httpS+", "", link.get('href'))
- print result
- print "____________________________________________________"
- for link in soup.findAll('a'):
- print(link.get('href'))
- result = re.sub(r"httpS+", "", link.get('href'))
- for link in soup.findAll('a'):
- print(link.get('href'))
- if link.get('href')==None:
- continue
- result = re.sub(r"httpS+", "", link.get('href'))
Add Comment
Please, Sign In to add comment