镜像自地址
https://gitlab.wikimedia.org/repos/mediawiki/services/zotero-translators.git
已同步 2024-06-03 03:50:18 +08:00
Fix UW Madison catalog (#2828)
这个提交包含在:
父节点
32f2271bf0
当前提交
056195ff97
|
@ -9,7 +9,7 @@
|
|||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-11-18 23:11:36"
|
||||
"lastUpdated": "2022-05-31 01:20:34"
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -75,7 +75,7 @@ function detectWeb(doc, url) {
|
|||
}
|
||||
|
||||
function getFormat(doc) {
|
||||
return ZU.xpathText(doc, '//span[@class="pub_title" and contains(., "Format")]/following-sibling::span[@class="pub_desc"]');
|
||||
return text(doc, '.type');
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
|
@ -121,7 +121,7 @@ function scrape(doc, url) {
|
|||
text = text.replace(/^(AU\s+-.*), \d\d\d\d-(\d\d\d\d)?$/m, "$1");
|
||||
// music scores should be treated as book
|
||||
text = text.replace('TY - MUSIC', 'TY - BOOK');
|
||||
if (getFormat(doc).includes('Book')) {
|
||||
if (getFormat(doc) && getFormat(doc).includes('Book')) {
|
||||
// fix for an odd RIS issue in one of the tests - a book is tagged
|
||||
// as a presentation
|
||||
text = text.replace('TY - SLIDE', 'TY - BOOK');
|
||||
|
|
正在加载...
在新工单中引用
屏蔽一个用户