nodejs怎么记录登录信息?抓取需要登录页面的内容?


简单来说就是想抓学校教务网上的成绩
不需要登录的页面已经会抓取了
现在的问题是,需要登陆的的页面要怎么记录登录信息,才能在下次发送请求时,能够请求到需要登录的页面???

nodejs爬虫 node.js JavaScript

westl 10 years, 2 months ago

明显是用requests啊,你去github看看这个包

changer answered 10 years, 2 months ago


 var cookieParser = require('cookie-parser');

zeroro answered 10 years, 2 months ago

你可以自己把每一个response的set-cookie中的信息提取出来,下次request时,组织成cookie信息,再传给服务器,就ok了。

千梵是笨蛋 answered 10 years, 2 months ago

Your Answer