我需要一种使用 Python从该网页https://iota-nodes.net/的列表中提取 url 的方法。我试过 BeautifulSoup 但没有成功。我的代码是:
from bs4 import BeautifulSoup, SoupStrainer
import requests
url = "https://iota-nodes.net/"
page = requests.get(url)
data = page.text
soup = BeautifulSoup(data)
for link in soup.find_all('a'):
print(link.get('href'))