''' Created on Mar 11, 2014 @author: Brett Paufler Copyright Brett Paufler 2014 ''' print "Start website_ripper" import re import urllib2 import os sourceFileLocation = "web_page_with_links.html" sourceFile = open(sourceFileLocation, 'r') def makeOutputDirectory(a,letter=0): print "makeOutputDirectory called" if letter: c = a + ".\\" + letter + ".\\" else: c = a if not os.path.exists(c): os.makedirs(c) print "Directory " + c + " was created" else: print "Directory " + c + " already existed" new_dir = "new_dir" makeOutputDirectory(new_dir) # This is project specific, inputed by hand from html aNameStart = '"0" alt=""> ' aNameEnd = '' aLinkStart = 'href="' aLinkEnd = '/">