Google Search Parser
Posted: Sat Dec 11, 2010 1:59 pm
Hello, I'm making something like crawler or so, and I have little problems which I can't solve myself, so I think maybe you can.
here is URL, i must insert keyword like any interested word to be searched and then retrieve all the divs from this site
http://www.google.com/search?hl=en&sour ... q=$keyword
and save to webpage. I thought it's easy to find <div class='div_name' for beginning of the div and the end but, it's harder because they are different and I can't search all the matchings for 1 pattern. Div must contain these kind of thinhs:
Div title
Div snippet
I know it's must be easy but i'm struck.
Example :
$keyword = 'Michael Jordan'
then 1 div must containt this:
Div title = Michael Jordan - Wikipedia, the free encyclopedi
Div snippet = Michael Jeffrey Jordan (born February 17, 1963) is a former American professional basketball player, active businessman, and majority owner of the Charlotte ...
Thank you very much.
here is URL, i must insert keyword like any interested word to be searched and then retrieve all the divs from this site
http://www.google.com/search?hl=en&sour ... q=$keyword
and save to webpage. I thought it's easy to find <div class='div_name' for beginning of the div and the end but, it's harder because they are different and I can't search all the matchings for 1 pattern. Div must contain these kind of thinhs:
Div title
Div snippet
I know it's must be easy but i'm struck.
Example :
$keyword = 'Michael Jordan'
then 1 div must containt this:
Div title = Michael Jordan - Wikipedia, the free encyclopedi
Div snippet = Michael Jeffrey Jordan (born February 17, 1963) is a former American professional basketball player, active businessman, and majority owner of the Charlotte ...
Thank you very much.