So lets say there are several webpages that have a bunch of links on them (all web pages are formatted the same). How would I go about pulling the taking all of these links and re-ordering them onto a new page. Now the hard part is the website I'm pulling the links from is constantly changing them. So I would need to pull them all each time my page ran.
Ex.
Page A
link 1a
link 2a
link 3a

Page B
link 1b
link 2b
link 3b

Page We're Writing.
link 1a
link 1b
link 2a
link 2b
link 3a
link 3b

What I am trying to figure out is what language would be best to do this in and/or even what function I could do this with. Has anyone on here done something similar that I could look at.
Thank you for the help.