Skip to content

Commit

Permalink
fix: add date_published selector in www.ossnews.jp extractor (#376)
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 3e91ac5 commit 7c0949e
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.ossnews.jp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ export const WwwOssnewsJpExtractor = {

author: null,

date_published: null,
date_published: {
selectors: ['p.fs12'],
format: 'YYYY年MM月DD日 HH:mm',
timezone: 'Asia/Tokyo',
},

dek: null,

Expand Down
2 changes: 1 addition & 1 deletion src/extractors/custom/www.ossnews.jp/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('WwwOssnewsJpExtractor', () => {

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

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

0 comments on commit 7c0949e

Please sign in to comment.