Visit links scraped from website

I am scraping links on a forum so I can visit them and perform actions on them.

How do I set it up so it visits each link and performs the same action on each link?
and when it is done I need it to remember which links it already performed actions on, so it can skip those links.

can someone help???