抓取的页码和实际页码存在偏差,例如 66-81+125 只能抓取 66-81,无法抓取后半部分。
The link of Jasminum's metadata extraction is roughly as follows: 1. First, the title is extracted from the PDF content or file name. 2. The title is used to query the KNOWNET search interface to retrieve candidate results: the mainland station is https://kns.cnki.net/kns8s/brief/grid. 3. The details page URL, exportID/dbname/filename, etc. are parsed from the search results. 4. After selecting the results, Jasminum does not parse the page numbers one by one, but instead passes the KNOWNET page to the official CNKI translator of Zotero: 5c95b67b-41c5-4f55-b71a-48d5d7183063. 5. The CNKI translator of Zotero then calls the KNOWNET export interface to generate Zotero entries using text exports such as RefWorks/EndNote. The key code is here: cnki.ts to query KNOWNET, cnki.ts to call the Zotero CNKI translator, and CNKI.js to call the KNOWNET export interface using DisplayMode=Refworks.
66-81+125 becomes 66-81, which is more likely to be caused by the format interpretation of export/import, rather than the inability of the Zotero page number field to store it. The test case of the official Zotero CNKI translator includes 18-30+115, which indicates that the pages field can store this format. The most suspicious point is the processing logic of the RefWorks importer: SP is mapped to pages, and OP is only used to form page start-end if the existing pages is not in the range. If SP is already 66-81, and it encounters OP 125, it will treat 125 as a spare page number or other page number, rather than forming 66-81+125. The code is: RefWorks Tagged.js Therefore, the conclusion is that Jasminum itself does not have a specific correction for page numbers; it relies on the KNOWNET export text and the Zotero translator. If the KNOWNET data for RefWorks/EndNote splits the page number into SP 66-81 + OP 125, the current import logic is likely to only retain 66-81. If KNOWNET directly provides SP 66-81+125, it can be retained normally. The solution is to add an additional layer of correction after Jasminum's CNKI translation, extract the complete "page number/Pages" string from the KNOWNET detail page or export text, and if it finds number-number+number, overwrite the newItem.pages. This is safer than changing the global RefWorks importer of Zotero, because the latter will affect all RefWorks imports.
内容来源: l0o0/jasminum