Пример #1
0
def checkPath(path):
    d = len(path)
    for i in xrange(0, d - 1):
        resp = headRequestCached(path[i])
        if isGoodStatus(resp) and isPage(resp):
            content = getRequestCached(path[i])
            urls = getURLs(content, path[i])
            if path[i + 1] not in urls:
                return False
        else:
            return False
    return True
Пример #2
0
 def getEntries(self):
     content = getRequestCached(self.url)
     urls = getURLs(content, self.url)
     urls = map(url2name, urls)
     urls = urls + [getPageFileName(self.url)]
     return urls