我已经看过先前对这个问题的几个回答,但无法确定我应该给哪个“自我”打电话。请参见下面的代码。
from urllib.request import urlopen as uo
from bs4 import BeautifulSoup as bs
html = uo('https://finance.yahoo.com/quote/NEM?
p=NEM&.tsrc=fin-srch')
read= bs(html.read(),'html.parser')
MarketCap= bs.find(span='Trsdu(0.3s) ')
print(MarketCap.get_text())