提交 544d2c73 编写于 作者: 孟政元

add some log and debug ouput

上级 0a8680ea
......@@ -5,6 +5,7 @@ COPY . /app
RUN rm -rf node_modules \
&& rm package-lock.json \
&& npm config set registry "https://registry.npm.taobao.org/" \
&& npm install
EXPOSE 3000
......
{
"name": "NeteaseCloudMusicApi",
"version": "2.8.8",
"version": "2.8.9",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
......
......@@ -2,7 +2,7 @@ const Encrypt = require("./crypto.js");
const request = require("request");
const querystring = require("querystring");
// request.debug = true;
request.debug = true;
function randomUserAgent() {
const userAgentList = [
......@@ -62,9 +62,13 @@ function createWebAPIRequest(
}),
proxy: proxy
};
console.log(
`[request] ${options.method} ${options.url} proxy:${options.proxy}`
);
request(options, function(error, res, body) {
if (error) {
console.error(error);
errorcallback(error);
} else {
//解决 网易云 cookie 添加 .music.163.com 域设置。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册