SoupStrainer来挑选文档中你想要的部分解析
links = SoupStrainer('a')[tag for tag in BeautifulSoup(doc, parseOnlyThese=links)]
?