Click here to Skip to main content
15,794,795 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
How do i extract result URLs from yahoo/bing search . I dont want to use API's and i only know how to get the entire html page as the result. How do take only the result set and display by removing all other links and advertisements ??
Posted
Comments
Sandip.Nascar 19-Feb-14 12:41pm    
There is no other way other than manipulating the html with regex or some other way to extract actual result.
The drawbacks with this system is whenever the design layout change in future the routine to extract data will fail.
Member 10609453 27-Feb-14 10:19am    
so, basically wat shud i do with this html garbage on the screen ??
https://drive.google.com/file/d/0Bzekk7dDCed8dlZRV2VENndPblU/edit?usp=sharing
Sandip.Nascar 27-Feb-14 10:50am    
simple... get the html as text and use regex or other string operation to remove tags and get the actual text required.
Member 10609453 27-Feb-14 13:44pm    
but the regex keeps on changing from time to time ..
Sandip.Nascar 27-Feb-14 16:59pm    
why regex will change? The problem with this approach is if the html changes, your string parsing routine need a change to get the right data.

1 solution

Quote:
How do take only the result set and display by removing all other links and advertisements ??
Consider RSS[^]
 
Share this answer
 
Comments
Member 10609453 27-Feb-14 10:17am    
i need to search the websites through my app , summary wont be enuf
thatraja 27-Feb-14 10:36am    
Other alternative is web scraping. In Codeproject you could find many articles on that topic.

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