diff --git a/CNKI.js b/CNKI.js index bedc1421bb5..c8b3370e550 100644 --- a/CNKI.js +++ b/CNKI.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-11-22 15:14:19" + "lastUpdated": "2023-11-27 05:30:22" } /* @@ -38,21 +38,7 @@ // Fetches RefWorks records for provided IDs and calls onDataAvailable with resulting text // ids should be in the form [{dbname: "CDFDLAST2013", filename: "1013102302.nh"}] -async function getRefWorksByID(id) { - if (!id) return; - var { dbname, filename } = id; - var postData = `FileName=${dbname}!${filename}!1!0&DisplayMode=Refworks&OrderParam=0&OrderType=desc&SelectField=&PageIndex=1&PageSize=20&language=&uniplatform=NZKPT&random=0.30585230060685187`; - var refer = `https://kns.cnki.net/dm/manage/export.html?filename=${dbname}!${filename}!1!0&displaymode=NEW&uniplatform=NZKPT`; - var reftext = await request( - 'https://kns.cnki.net/dm/api/ShowExport', - { - method: "POST", - body: postData, - headers: { - Referer: refer - } - } - ); +function toStdRef(reftext) { return reftext .body .replace("