Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using the C#.net for screen scrapping. I am able to write the screen scrap program for scrapping information on website. But if the layout of the website will be changed, the screen scrap program will not longer be work. (the scraping will be break'd after changing the layout of the website).

So, can anyone tell me what is the solution of this problem?

Thank You
Harish Kumar
Posted

There is no way to prevent this from happening. You can mitigate it by using IDs (if they're assigned), but even that could change at the whim of the web site's coder. In essence, you're screwed and there's nothing you can do about it excpet try to keep up with the changes and hope they don't happen too often.
 
Share this answer
 
v2
Comments
#realJSOP 8-Apr-11 9:51am    
From OP: okay! but if the layout of the website will be changed, can it is possible to receive an automatically alert shows that the website will be changed.
#realJSOP 8-Apr-11 9:58am    
Sure - just wait fro something unexpected to happen and handle it appropriately in your code. Unfortunately, the only way you can really do this is by actually scrapinhg the page and trying to parse it with your existing code. No matter what you do, you're going to have to change your code to make it work after a change to the site. Your best strategy is to put your scraping code into a DLL so that all you have to do is change/update that.
@John: okay! but if the layout of the website will be changed, can it is possible to receive an automatically alert shows that the website will be changed.
 
Share this answer
 
Comments
#realJSOP 8-Apr-11 9:58am    
Use the Add Comment link under an answer. I moved this for you, so refer to my original answer for a response.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900