是否可以只获取特定的URL?喜欢:next...next...next...输出应该只是来自http://www.iwashere.com/的URL例如,输出URL:http://www.iwashere.com/washere.htmlhttp://www.iwashere.com/wasnot.html我是用字符串逻辑做的。BeautifulSoup有什么直接的方法吗? 最佳答案 您可以匹配多个方面,包括对属性值使用正则表达式:importresoup.find_all('a',href=re.compile('http://w