Skip to content
Advertisement

Scrape HTML Page that redirects to itself using Curl PHP

So i’m trying to scrape this page: http://www.asx.com.au/asx/statistics/todayAnns.do

it seems that my code can’t get the whole page html code , it acts very wierd.

I’ve tried with simple html dom, but nothing works.

JavaScript

This shows mostly javascript and i can’t get the page. My goal is to scrape that middle table on the url.

Advertisement

Answer

If you don’t need the most recent data then you can use the cached version of the page from Google.

JavaScript

I was able to get the following data using above code.

JavaScript

Disclaimer: I used https://github.com/rajanrx/php-scrape framework and I am an author of that library. You can grab data using simple curl as well using the xpath listed above.I hope this might be helpful 🙂

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement