Skip to content

Commit 65de0ce

Browse files
committed
Fix author
1 parent f9cb980 commit 65de0ce

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/get-data/rules/author.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ module.exports = [
6363
wrap($ => $('[itemprop*="author"] [itemprop="name"]').first().text()),
6464
wrap($ => $('[itemprop*="author"]').first().text()),
6565
wrap($ => $('meta[property="book:author"]').attr('content')),
66-
strict(wrap($ => $('a[class*="author"]').first().text())),
66+
strict(wrap($ => $('a[class*="author"]').text())),
6767
strict(wrap($ => $('[class*="author"] a').first().text())),
68-
strict(wrap($ => $('[class*="author"]').first().text())),
69-
strict(wrap($ => $('[class*="byline"]').text())),
70-
strict(wrap($ => $('a[href*="/author/"]').text()))
68+
strict(wrap($ => $('a[href*="/author/"]').first().text())),
69+
strict(wrap($ => $('a[href*="/author/"]').text())),
70+
strict(wrap($ => $('[class*="author"]').text())),
71+
strict(wrap($ => $('[class*="byline"]').text()))
7172
]

test/fixtures/the-register/output.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"author": "Common Topics",
2+
"author": "Chris Mellor",
33
"date": "2016-05-03T16:26:00.000Z",
44
"description": "Announcement overload? Oh, you'll love it just as much as Big Mickey Dell",
55
"image": "https://regmedia.co.uk/2016/05/04/raincloud_teaser.jpg?x=1200&y=794",

0 commit comments

Comments
 (0)