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 ^_^