import bs4
import requests
from bs4 import BeautifulSoup
import urllib.request
#data I want to pull then push a while loop to get it regularly by the minute
r = requests.get('https://finance.yahoo.com/quote/MSFT?p=MSFT&.tsrc=fin-srch')
soup = BeautifulSoup(r.text, 'xml')
print(soup)
问问题
26 次
1 回答
0
请检查文档:
https://www.crummy.com/software/BeautifulSoup/bs4/doc/
您需要调用汤对象的函数。例如:
print(soup.get_text())
于 2020-03-03T21:16:00.270 回答