|
9 | 9 | "inRepository": true, |
10 | 10 | "translatorType": 4, |
11 | 11 | "browserSupport": "gcsibv", |
12 | | - "lastUpdated": "2025-06-19 15:33:45" |
| 12 | + "lastUpdated": "2025-07-11 03:58:04" |
13 | 13 | } |
14 | 14 |
|
15 | 15 | /* |
@@ -71,9 +71,9 @@ const typeMap = { |
71 | 71 | }; |
72 | 72 |
|
73 | 73 | function detectWeb(doc, url) { |
74 | | - const dynamic = doc.querySelector('body, .container-flex, .periodical'); |
| 74 | + const dynamic = doc.querySelector('#app, .container-flex, .periodical'); |
75 | 75 | if (dynamic) { |
76 | | - Z.monitorDOMChanges(dynamic, { childList: true }); |
| 76 | + Z.monitorDOMChanges(dynamic, { childList: true, subtree: true }); |
77 | 77 | } |
78 | 78 | for (const key in typeMap) { |
79 | 79 | if (new RegExp(`/${key}/`, 'i').test(url)) { |
@@ -191,7 +191,7 @@ async function scrapePage(doc, type, id) { |
191 | 191 | newItem.date = tryMatch(pubInfo, /^\d{4}/); |
192 | 192 | newItem.volume = tryMatch(pubInfo, /,0*(\d+)\(/, 1); |
193 | 193 | newItem.issue = tryMatch(pubInfo, /\((.+?)\)/, 1).replace(/0*(\d+)/, '$1'); |
194 | | - newItem.publicationTitle = text(doc, '.periodicalName'); |
| 194 | + newItem.publicationTitle = text(doc, '.periodicalName').replace(/\(([^)]+)\)$/, '($1)'); |
195 | 195 | newItem.pages = tryMatch(data('页数'), /\((.+)\)/, 1) |
196 | 196 | .replace(/\b0*(\d+)/, '$1') |
197 | 197 | .replace(/\+/g, ',') |
@@ -419,7 +419,7 @@ function parseJson(json, type, id) { |
419 | 419 | }[json.language] || 'zh-CN'; |
420 | 420 | switch (newItem.itemType) { |
421 | 421 | case 'journalArticle': { |
422 | | - newItem.publicationTitle = json.periodicaltitleList[0]; |
| 422 | + newItem.publicationTitle = json.periodicaltitleList[0].replace(/\(([^)]+)\)$/, '($1)'); |
423 | 423 | extra.set('original-container-title', json.periodicaltitleList[1], true); |
424 | 424 | newItem.volume = json.volum; |
425 | 425 | newItem.issue = json.issue; |
|
0 commit comments