Skip to content

Commit

Permalink
fix #354
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaojiaodubai committed Jun 20, 2024
1 parent 651a7b3 commit 34c49c0
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions People's Daily Database.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2023-12-31 11:19:42"
"lastUpdated": "2024-06-20 08:08:20"
}

/*
Expand Down Expand Up @@ -92,7 +92,7 @@ async function scrape(doc, url = doc.location.href) {
newItem.language = 'zh-CN';
newItem.ISSN = '1672-8386';
newItem.url = url;
text(doc, 'div.author').slice(4, -1).split(/[,、\s;]+/)
text(doc, 'div.author').replace(/^【?本报记者 ?|】$/g, '').split(/[,、\s;]+/)
.forEach((creator) => {
creator = ZU.cleanAuthor(creator, 'author');
creator.fieldMode = 1;
Expand Down Expand Up @@ -146,7 +146,41 @@ var testCases = [
"seeAlso": []
}
]
},
{
"type": "web",
"url": "http://data.people.com.cn/rmrb/20240620/1/24c0fd81008447179e4e53127ac959d2",
"items": [
{
"itemType": "newspaperArticle",
"title": "学党史 明党纪党纪学习教育开展以来,中国共产党历史展览馆充分发挥党史展览的教育功能——",
"creators": [
{
"firstName": "",
"lastName": "李林蔚",
"creatorType": "author",
"fieldMode": 1
}
],
"date": "2024-06-20",
"ISSN": "1672-8386",
"language": "zh-CN",
"libraryCatalog": "People's Daily Database",
"pages": "1",
"publicationTitle": "人民日报",
"shortTitle": "学党史 明党纪",
"url": "http://data.people.com.cn/rmrb/20240620/1/24c0fd81008447179e4e53127ac959d2",
"attachments": [
{
"title": "Snapshot",
"mimeType": "text/html"
}
],
"tags": [],
"notes": [],
"seeAlso": []
}
]
}
]

/** END TEST CASES **/

0 comments on commit 34c49c0

Please sign in to comment.