

def crawl(linksto, depth='0'):
    'Performs second degree crawling from the 1st crawl function. No recursion\n  necessary for a shalow crawl.'
    if (linksto and (len(linksto) > 3) and (linksto[:4] != 'http')):
        Stop()
    else:
        links = setolinks(linksto)
        if links:
            y = len(links)
            globs.numrows = len(globs.sheet.col_values(1))
            if depth:
                depth = (int(depth) + 1)
            linkslist = zip(([linksto] * y), links, ([depth] * y))
            InsertRows(globs.sheet, linkslist, globs.numrows)
            return 'visited'
        else:
            return "can't reach"

dataset/ETHPy150Open miklevin/pipulate/common.py crawl/original