If the links change frequently, you can read the headings sent from the old link and see if there are headings to redirect to new links.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3
these are html redirect codes
I do not know what software you use to clean up, but I am sure that it can handle redirection.
for example: in CURL written in php, the following code is used to redirect
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //FROM http://stackoverflow.com/questions/3519939/make-curl-follow-redirects
To answer your request
I would like to know any good tool or some book that can help me understand about the use of artificial intelligence in a web scraper
PHP is a good tool for understanding basic web scraping, but it's not as fast as you might imagine. The fastest technology I know for this is ERLANG. But it is not so friendly to beginners.
source share