Correct link to main page
Use html parser instead of regex