Skip to content

Commit

Permalink
fix: add date_published selector in www.sanwa.co.jp extractor (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
kik0220 authored and toufic-m committed Apr 16, 2019
1 parent ea5b65f commit 779c115
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/extractors/custom/www.sanwa.co.jp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ export const WwwSanwaCoJpExtractor = {

author: null,

date_published: null,
date_published: {
selectors: ['p.date'],
format: 'YYYY.MM.DD',
timezone: 'Asia/Tokyo',
},

dek: {
selectors: [['meta[name="og:description"]', 'value']],
Expand Down
2 changes: 1 addition & 1 deletion src/extractors/custom/www.sanwa.co.jp/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('WwwSanwaCoJpExtractor', () => {

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

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

0 comments on commit 779c115

Please sign in to comment.