When I got off work last weekend, I saw a group of QQ friends asking, "How to capture Google search results? "At ordinary times, this group of experts is also numerous and are very active. Today suddenly there is no movement (it is estimated that the weekend is busy), I went to view the source code of the Google search results page. There is no actual "Search Text" in the source code, but a large number of Js. Although Google's JsCodeI didn't have a strong reading ability, and I didn't have formatting to read it. I tried to find some key points (for example, Ajax-related ones, some other JS contained). I found something:
Http://www.google.com.hk/complete/search? Q = Hello. Open this file and you will get a JS file with the following content:
Window. google. AC. H (["hello", [["Hello Kitty", "", "0"], ["Hello Kitty store", "", "1"], ["Hello Kitty image", "", "2"], ["hello", "", "3"], ["Hello Kitty ","", "4"], ["Hello World", "", "5"], ["Hello pizza", "", "6"], ["hello teddy ", "", "7"], ["hellotxt", "", "8"], ["hellocq", "", "9"], {"K ": 1}])
The keyword "hello" is included here. (Give full play to your imagination, at least as a Seo data source .)
However, the above problem has not been solved yet, and then I went on to look at the code (or skip) and suddenly found out: "no_ajax_no_load.js, suddenly, can users who do not support Ajax use Google? Google, a large company, will certainly not give up banned JavaScript users. After I disabled JavaScript and tested it, I found the following address:
Http://www.google.com.hk/search? Hl = ZH-CN & newwindow = 1 & Safe = strict & GBV = 1 & Q =Hello
Okay, the problem is solved. The search result pageSource codeContains the captured content. You do not need to disable javascript when using this URL.
(I did not actually write code to capture the results of the test, but I use webmaster robot tools (http://tool.chinaz.com/Tools/Robot.aspx) can get content. Of course, I think Google must also have related restrictions, such as the Access frequency limit of the same IP address.