Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.
============== RESTART: /Users/rjw/Documents/Python/getLinks.py ============== <_sre.SRE_Match object at 0x1021a0f30>
# http://www.theherbsplacenews.com/ import urllib2 import re #connect to a URL website = urllib2.urlopen('http://www.theherbsplacenews.com/') #read html code html = website.read() #use re.findall to get all the links # links = re.findall('"(http://www.theherbsplace.com/.*?)"', html) prog = re.compile('"http://www\.theherbsplace\.com/(.*?)?"') result = prog.match('"http://www.theherbsplace.com/\1" rel="nofollow"') print result
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.