A lot of friends around you like to brush, of course, I am no exception,
But the mobile phone brush too consumes the flow, the computer is not very convenient.
So, the birth of this piece of software: clang clang! Know the chin =. =
You know the chin, transliteration is the next ~
First we come to a wisp of thoughts, think about what to do, make a simple demand.
The requirements are as follows:
1. Analog Access website (http://www.zhihu.com/)
2. Download the specified page content, including: Hottest Today, hottest month, editor's recommendation
3. Download all questions and answers in the specified category, such as: investment, programming, Hang section
4. Download all answers from the designated respondents
5. It is best to have a one-click-like abnormal function (so that I can give Gureren all the answers to all the praise I was so witty!) )
The technical problems that need to be solved are listed as follows:
1. Simulate browser access to Web pages
2. Capture key data and save to local
3. Solve the dynamic loading problem in Web browsing
4. Use a tree-like structure to crawl all the content you know
Well, I think about that right now.
The next step is to get ready for work.
1. Determine the crawler language: because previously written a series of crawler tutorials (click here), Baidu Bar, embarrassing Encyclopedia, Shandong University's performance Point query, etc. are written in Python, so this time decided to use Java to write (feed at all not half a dime contact?).
2. Popular Science crawler Knowledge: Web crawler, which is the spider, is a very image of the name. The internet is likened to a spider's web, so spiders are crawling around the web. Web spiders look for Web pages through the URL of a Web page. Please click here for specific introductory information.
3. Prepare the crawler environment: the installation and configuration of JDK and eclipse are not much to say. Here, a good browser is very important to the crawler, because first you need to browse the Web page to know where you need, you can tell your crawler where to climb. A personal recommendation for Firefox, or Google Chrome, has a powerful right-click Review element and the ability to view the source code.
Below we start the official Reptile tour! ~
Welcome to our small partners to submit pr:https://github.com/callmewhy/zhihudown on GitHub
http://blog.csdn.net/pleasecallmewhy/article/details/17538809
[Java] The No. 0 episode of the chin: Let's make a known crawler, oh yes