if a not in links and a not in invalidLinks and a != '' :