From a80eacb8b413333f9953c605c4cb8f11748fe05b Mon Sep 17 00:00:00 2001 From: any Date: Mon, 18 Jan 2021 14:49:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B8=E5=B9=B4=E5=85=BD=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89ua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_nian.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_nian.js b/jd_nian.js index afc7b4f2..3658120f 100644 --- a/jd_nian.js +++ b/jd_nian.js @@ -878,7 +878,7 @@ function taskPostUrl(function_id, body = {}, function_id2) { "origin": "https://h5.m.jd.com", "referer": "https://h5.m.jd.com/", 'Content-Type': 'application/x-www-form-urlencoded', - "User-Agent": "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") } } }