简体   繁体   English

如何从该网站自动获取一个csv文件?

[英]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.

相关问题 如何实施拍卖网站的时间管理? - How do I go about implementing time management for auction website? 如何从内嵌JavaScript抓取网址 - How do I go about scraping a url from inline javascript 如何在我的网站上使用我的 CSV 文件中的数据? - How do i use the data in my CSV file on my website? 我建立了一个多页面网站,必须将其变成一个双语网站,将所有内容从英语翻译成法语,我该怎么做 go? - I have built a multi-page website and have to make it a dual language site which translates everything from english to french, how do I go about this? 我如何解决这个算法? - How do I go about solving this algorithm? 如何发送和接收 ajax 请求而不是从 main.js 文件中抓取代码? - How do I send and receive the ajax request instead of grabbing the code from the main.js file? 我将如何在此网站上为导航创建悬停动画? - How would I go about creating the hover animation for the nav in this website? 如何在提交表单的HTML文件中显示使用post方法提交的值? - How do I go about displaying the values submitted using the post method In the HTML file which the form was submitted to? 如何将常规的javascript文件集成到我的vue.js页面中? - How do I go about integrating a regular javascript file into my vue.js page? 当我正在测试的文件通过从卸载的 DOM 中抓取一个元素开始时,我如何在 Jest 中运行测试? - How do I run a test in Jest when the file I'm testing starts by grabbing an element from the unloaded DOM?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM