0 Basic Writing Java knowledge of the preparation of the crawler _java

Source: Internet
Author: User

We are still the same as the original, talk about the idea of doing reptiles and need to prepare the knowledge of it, experts please directly ignore.

First we have a wisp of thoughts, think about what to do, make a simple demand.

Requirements are as follows:

1. Analog visit to the official website (http://www.zhihu.com/)

2. Download the specified page content, including: The hottest today, the hottest this month, edit recommended

3. Download all the questions and answers in the specified categories, such as: investment, programming, hanging section

4. Download all answers to the specified respondents

5. It is best to have a key point of the abnormal function (so I can give Reylen all the answers all the point of praise I was too witty!) )

The technical issues that need to be addressed are simply listed below:

1. Analog browser access to the Web page

2. Capture critical data and save to local

3. Solve the dynamic loading problem in Web browsing

4. Using a tree-like structure to grab all the content you know

Well, that's all I've been thinking about right now.

The next step is to get ready for work.

1. Identify the reptile language: As a result of a series of reptile tutorials previously written (click here), Baidu Bar, embarrassing Encyclopedia, Shandong University Point of inquiry, etc. are written in Python, so this decision to use Java to write (hello completely without half a dime contact good).

2. Science crawler Knowledge: Web crawler, that is, the Spider, is a very image of the name. The internet is likened to a spider web, so spider is the spider crawling up and down the Internet. Web spiders look for Web pages by their link addresses. Specific Introductory Introduction Please (click here).

3. Prepare the crawler environment: JDK and Eclipse installation and configuration is not much to say. In a word, a good browser is very important to a crawler, because first you need to browse the Web page to see where you need it, so you can tell your reptiles where to climb. The individual recommends Firefox browser, or Google Browser, their right key to review elements and view the source code is very powerful.

Here we begin the official reptile journey! ~ Specifically what to say, well, this is a problem, let me think about it, don't worry ^_^

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.