code to process the urls that appear on the page