Skip to content

Commit

Permalink
Added title for checking the date
Browse files Browse the repository at this point in the history
Blogger seems to use title instead of content. Example: https://blog.gardeviance.org/2024/02/a-good-enough-map.html
  • Loading branch information
masylum authored and Kikobeats committed Jul 3, 2024
1 parent 1f19f59 commit e81e8f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/metascraper-date/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const dateRules = () => {
return [
toDate($ => $('meta[name="date" i]').attr('content')),
toDate($ => $('[itemprop*="date" i]').attr('content')),
toDate($ => $('[itemprop*="date" i]').attr('title')),
toDate($ => $('time[itemprop*="date" i]').attr('datetime')),
toDate($ => $('time[datetime]').attr('datetime')),
toDate($ => $filter($, $('[class*="byline" i]'))),
Expand All @@ -23,6 +24,7 @@ const datePublishedRules = () => {
toDate($jsonld('dateCreated')),
toDate($ => $('meta[property*="published_time" i]').attr('content')),
toDate($ => $('[itemprop="datepublished" i]').attr('content')),
toDate($ => $('[itemprop="datepublished" i]').attr('title')),
toDate($ => $filter($, $('[class*="publish" i]')))
]
}
Expand Down

0 comments on commit e81e8f1

Please sign in to comment.