def confirm_input(url, recursive):
    a = re.compile("^http://", re.IGNORECASE)
    if not a.match(url):
        print("Input does not appear to be a valid url (hint: http://)")
    elif recursive:
        dom = url.split("/")[2]
        print("current domain is " + dom)
        downTools.recursiveload(url, dom, db)
    elif not recursive:
        dom = url.split("/")[2]
        print("current domain is " + dom)
        downTools.loadUrl(url, 0, db)
 def test_downTools_recursiveLoad(self):
     #should only connect to 1 site then stop as dom is set to a invalid domain
     downTools.recursiveload("http://handbooks.uwa.edu.au/units/unitdetails?code=cits3200", "nonstartme", DBconfig.DBconfig())
     pass #if it got here it ran