Off late I have been doing some work on Web Scraping. After some research and analysis I could get a hang of it. But I have stuck to some point which I am not able to find suitable answers even after googling. The point I have stuck is, through web scraping, I log into intranet page with log in user & password, For a given URL in my code I am able to fetch the data but when the URL changes my code fails to log in because of the reason that the code has hit wrong URL. Now the code which hits the link is kind of Agent which on refresh command hits the URL.
I would like to know any good Tool or some book which can help me to understand on Applying artificial intelligence on Web scraping. with this I can dynamically handle my agents without re-configuring it manually. Any help could be of great pleasure.