📜  获取 href bs4 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:55.285000             🧑  作者: Mango

代码示例1
from BeautifulSoup import BeautifulSoup

html = '''next
later'''

soup = BeautifulSoup(html)

for a in soup.find_all('a', href=True):
    print "Found the URL:", a['href']