1. 程式人生 > >基於nodejs爬蟲程式下載

基於nodejs爬蟲程式下載

node-crawler

一個基於nodejs的網站採集伺服器 可部署在任何伺服器上遠端呼叫

DEMO

傳送請求 run npm dev POST: /scan

{
    "url": "http://www.charlotterusse.com/shoes/shop-all-shoes?sz=30&start=0",
    "model": [{"find":".product-tile","child":[{"name":"name","type":"","method":[{"find":".name-link","attr":""}]},{"name":"price","type":"","method"
:[{"find":".price-sales","attr":""}]},{"name":"image","type":"","method":[{"find":"img","attr":"src"}]},{"name":"url","type":"","method":[{"find":"a","attr":"href"}]}]}], "oid": "7e11c4cb-0456-e9a9-65d5-b64c86d12b94" }

部署

啟動伺服器

forever start server.js