[英]How do I go about automatically grabbing a csv file from this website?
There is this website: 有这个网站:
https://www.aemo.com.au/Electricity/National-Electricity-Market-NEM/Data-dashboard#price-demand https://www.aemo.com.au/Electricity/National-Electricity-Market-NEM/Data-dashboard#price-demand
that has some information I want to utilise for a project. 其中包含一些我想用于项目的信息。
In the top right there is a little download button that allows users to download a nice csv file that I can open in my code. 右上角有一个下载按钮,允许用户下载一个不错的csv文件,该文件可以在我的代码中打开。
My question is how I would go about automatically downloading this data from my python program. 我的问题是我将如何从python程序自动下载此数据。
I have tried to inspect the download button element and under "Event Listeners" in Chrome there is a .js file that executes when the download button is pressed: 我尝试检查下载按钮元素,并且在Chrome中的“事件监听器”下有一个.js文件,当按下下载按钮时会执行该文件:
https://www.aemo.com.au/aemo/apps/visualisations/dist/aurelia-24ac75bb54.js https://www.aemo.com.au/aemo/apps/visualisations/dist/aurelia-24ac75bb54.js
I'm just not too sure how to link it all together so I can automatically grab the csv file every 5-10 minutes. 我只是不太确定如何将它们链接在一起,因此我可以每5-10分钟自动抓取一个csv文件。
I was hoping that someone could help me! 我希望有人能帮助我!
Thanks 谢谢
just use BeautifulSoup and go through the documentation. 只需使用BeautifulSoup并阅读文档即可。
or else selenium webdriver would definitely help you out. 否则Selenium Webdriver一定会帮助您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.