Copying an html table from another website

Started by Atomixx, March 19, 2017, 05:57:09 PM

Previous topic - Next topic

Atomixx

Hello! On my forum, I need to import an html table from a different website with a live update. Any ideas?

Arantor

That largely depends on the other website and if they have an API or not, or whether you have to do it the hard way and hope they never ever change the structure of their page.

Atomixx

Quote from: Arantor on March 19, 2017, 06:33:57 PM
That largely depends on the other website and if they have an API or not, or whether you have to do it the hard way and hope they never ever change the structure of their page.

I know this may sound stupid, but what if I own the site? See, I use the second site because of a wordpress plugin that allows me to manage a league with statistics/standings etc. I don't know enough about coding to code my own league management mod so I just use the wordpress one. Other than that, I don't really need the wordpress site. So it would be more convenient to just put the standings table and statistics onto the forum.  The structure of the website won't be changing at all, only the data within the table will.

Colin

You can either create an API that will serve the data from site1 (your wordpress league site) or you can build a scraper which makes the HTTP request loads the page, and knows exactly where to look for the content that you want to access. The former is preferable.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Advertisement: