How to capture Google search results?

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.