Skip to content

Commit 779c115

Browse files
kik0220toufic-m
authored andcommitted
fix: add date_published selector in www.sanwa.co.jp extractor (#378)
1 parent ea5b65f commit 779c115

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/extractors/custom/www.sanwa.co.jp/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export const WwwSanwaCoJpExtractor = {
77

88
author: null,
99

10-
date_published: null,
10+
date_published: {
11+
selectors: ['p.date'],
12+
format: 'YYYY.MM.DD',
13+
timezone: 'Asia/Tokyo',
14+
},
1115

1216
dek: {
1317
selectors: [['meta[name="og:description"]', 'value']],

src/extractors/custom/www.sanwa.co.jp/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('WwwSanwaCoJpExtractor', () => {
5858

5959
// Update these values with the expected values from
6060
// the article.
61-
assert.equal(date_published, null);
61+
assert.equal(date_published, '2019-03-07T15:00:00.000Z');
6262
});
6363

6464
it('returns the dek', async () => {

0 commit comments

Comments
 (0)