I am attempting to scrape this website into Excel's Power Query .
https://www.barchart.com/futures/quotes/CBX18/all-futures
When I attempt to pull data into Excel, Power Query cannot find the displayed Brent Crude Oil Table. The desired table displayed here...
And the result of Power query not finding table here...
I found this article which goes over digging into the HTML of the desired website through Power Query, however I wasn't able to receive my expected results.
https://datachant.com/2017/03/30/web-scraping-power-bi-excel-power-query/
Any suggestions would be greatly appreciated as I am stuck and need to figure out how to get this data into a clean Excel spreadsheet. I am open to potentially using a new source or going about the scraping in a different technique1
1条答案
按热度按时间eqfvzcg81#
I would recommend this website which allows 100 free monthly API calls giving you access to not just Brent but also related commodities like WTI, Ethanol and Natural gas. With a free account you can get you an average of 4 datapoints a day (since market is closed on weekends and holidays) for free at different points in time during the day this would allow you to build a far more meaningful data set.
https://commodities-api.com/
This is going to be way, way easier than trying to setup some sort of web-scraping system because the HTML of that web-site could easily change, and the model for this API has been around for quite a while.
If you need old data, there are plenty of downloadable spreadsheets but if you need free up to date data, on how commodities are moving during the day, this is definitely the way to go.
here is an example
Other websites are going to continually change small things about their site to avoid scraping, using a free API is a better solution.