Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
 def test_downTools_loadUrl_build_unit(self):
     downTools.loadUrl("http://handbooks.uwa.edu.au/units/unitdetails?code=cits3200", 0, DBconfig.DBconfig())
     pass #if it got here it ran