我有一些股票,我认为这样做是个好主意,如果我的股票上涨到某个值,我收到一封电子邮件通知,我知道要发送一封使用python的电子邮件,我理解这些基础知识BeautifulSoup和我看到的问题告诉我如何判断一个网站是否有变化,但因为这是股票它会改变很多......任何帮助都会受到赞赏......
如果有兴趣的话,这是我目前的代码:
import requests
from bs4 import BeautifulSoup
page = requests.get("http://www.londonstockexchange.com/exchange/portfolio/summary.html#/trading-simulator/308259")
page
url = "http://www.londonstockexchange.com/exchange/portfolio/summary.html#/trading-simulator/308259"
values = {'***': 'user', #not going to give away my username and password
'***': 'pass'}
requests.session()
requests.post(url, data=values)
soup = BeautifulSoup(page.content, 'html.parser')
print(soup.prettify())