import urllib.request
import re
from bs4 import BeautifulSoup as soup
tickersymbol = 'A'
url = 'https://finance.yahoo.com/quote/'+tickersymbol+'p='+tickersymbol
htmlfile = urllib.request.urlopen(url)
htmltext = htmlfile.read().decode('utf-8')
page = soup(htmltext, "html.parser")
price = page.find_all('<span class="Trsdu(0.3s) Fw(b) Fz(36px) Mb(-4px) D(ib)"><!-- react-text: 331 -->(.+?)<!-- /react-text --></span>x')
print(price)
这会返回一个空列表,同时它应该返回股票的价格,该价格应该是'(。+?)'的位置。我做错了什么?