May 2017

I don't know if you've met it. Some people in Netease cloud have a one-sided concept of folk songs. Their thoughts are limited to playing guitar and singing NMP?

I came to the Celtic music style under the song, it is a clear stream, how can I have such a great song, the jumping feeling of each note, ah It's amazing

In the domestic folk song environment, listen again, always feel that a group of people are groaning without illness, and what they convey to you is decadence or decadence

Of course, singers like Huacong and Yanchi have their own distinctive characteristics

In fact, I have always liked the music styles played by Scotland and Ireland. It's much more interesting to listen to this kind of folk songs than some folk songs mainly based on guitar in China.

Wiki:( celtic [Chinese ])

If there is a novice to learn nodejs , get url post The same problem will occur when the parameter is returned. Let's solve this small problem today

node.js No php This old back-end language has specific methods to obtain external parameters. After all, it is a new force. I hope the later version can be more convenient and efficient

 //Normal acquisition values 
 app. Get ('/', (req, RES) = > {console. Log (req. Query); 
 res.send ('complete '); 
 app. Post (' / '(req, RES) = > {console. Log (req. Body); 
 res.send ('complete'); 

Normal output, your expectation is like this

 //Get request 
 {Name: 'Feng Xiaoxian', 
 age: '18' 
} completed


 //'post: {18}

But it's not!!!

 //Twice the output will be like this!!! 
{ }

This is because we lack a module, express middleware body-parser

Official statement
Node.js body parsing middleware.
Parse incoming request bodies in a middleware before your handlers, available under the req.body property.

Basically, parsing the content in the body of the client request, JSON encoding processing and URL encoding processing

Next we'll install it body-parser

 //Install body parser
npm install body parser

 //Import app.js/var varbodyparser = require ('body-parser '); app.use (bodyparser());;; 
 / / / so you can use req.body to get the value passed by post, using req.body to get the value passed by post. (' / ', (req, RES) = > { (' / ', (req, RES) = > > { (' / ', (req, res, RES) = > {console.log (req.body); 
res.send ('complete'); 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;. Json())

There is no motivation for learning, so eating jujube is? In the process of learning nodejs, I will give you a little refreshing?

Here I used the most simple crawler tutorial of cnodejs community to do the basic change eel, completed

 //Initialize the project 
 NPM init 
 / / start app. JS 
 node app. JS 
 / / and you can enjoy it  Play fast (see the end of the article for the code)

If you don't know how to use nodejs
Linux players can watch This is my article ; windows players can go to the official website to download. MSI and install it next Through train

Basic crawling ideas

  1. Page pagination button, catch all the page links of little sister that appear on this page, and store them
  2. Use eventproxy to access the pages of each little sister concurrently
  3. In the process of accessing, cherio (a module similar to jQuery) is used to match the image address we need and record all the image addresses found
  4. HTTP to request each image address, save the binary data stream
  5. FS will binary data stream, output into a picture file, the file name is extracted from the original address
  6. Save to folder

Here I am afraid that because the request is too large, use express to build a static page to provide query and download To reduce the possibility of crawling to death

Download address: