我有这个项目,我试图自动登录到Intuit Mint,下载我的所有交易,为我的每月支出创建一个Sankey图,然后将该图放在我的网站上。我试图通过Python自动化所有内容,并且我已经使用D3获得了Sankey图表。
但是,每当我尝试从Mint下载事务文件时,我都会遇到Access Denied问题(立即将我重定向到https://mint.intuit.com/accessDenied.html) - 我使用的是Selenium,但我认为Mint拒绝访问硒因为它认为我是机器人或其他东西。我怎么能绕过这个?
这是我目前的代码:
#Need the Chrome Webdriver
browser = webdriver.Chrome()
#Go to the login page
browser.get('https://accounts.intuit.com/index.html?offering_id=Intuit.ifs.mint&namespace_id=50000026&redirect_url=https://mint.intuit.com/overview.event')
#Find the login field and complete
login = browser.find_element_by_id('ius-userid')
login.send_keys('myusername')
#Find the password field and complete
password = browser.find_element_by_id('ius-password') # Password field
password.send_keys('mypassword' + Keys.RETURN)
# #If transactions.csv exists, remove it. If it doesn't, move on
# try:
# os.remove('transactions.csv')
# except OSError:
# pass
#Download the transactions file
browser.get('https://mint.intuit.com/transactionDownload.event?queryNew=&offset=0&filterType=cash&comparableType=8')
browser.quit()
此外,我知道我将在以后使用双因素身份验证时遇到问题......有什么方法可以解决这个问题吗?