尝试使用美丽汤来获取价值

时间:2018-08-26 21:59:09

标签: python python-3.x beautifulsoup stock

from bs4 import BeautifulSoup
import requests

url = 'https://www.gurufocus.com/dcf/AMZN'
r = requests.get(url)
soup = BeautifulSoup(r.content)
div = soup.find(id='result')

print (div)

结果是:

<div id="result"></div>

实际上div中存在一个值。

我对Python或BS知之甚少,无法获得该价值,并且希望获得帮助

0 个答案:

没有答案