-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #717 from masylum/date-title
chore(date): get value from title attribute
- Loading branch information
Showing
6 changed files
with
3,451 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,10 @@ | |
"name": "Laurent Goderre", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Pau Ramon Revilla", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Omar Diab", | ||
"email": "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict' | ||
|
||
const { readFile } = require('fs/promises') | ||
const { resolve } = require('path') | ||
const test = require('ava') | ||
|
||
const metascraper = require('../../..')([ | ||
require('metascraper-author')(), | ||
require('metascraper-date')(), | ||
require('metascraper-description')(), | ||
require('metascraper-audio')(), | ||
require('metascraper-video')(), | ||
require('metascraper-image')(), | ||
require('metascraper-lang')(), | ||
require('metascraper-logo')(), | ||
require('metascraper-logo-favicon')(), | ||
require('metascraper-manifest')(), | ||
require('metascraper-publisher')(), | ||
require('metascraper-title')(), | ||
require('metascraper-url')(), | ||
require('metascraper-readability')() | ||
]) | ||
|
||
const url = 'https://blog.gardeviance.org/2024/02/a-good-enough-map.html' | ||
|
||
test('blogger', async t => { | ||
const html = await readFile(resolve(__dirname, 'input.html')) | ||
const metadata = await metascraper({ html, url }) | ||
t.snapshot(metadata) | ||
}) |
Oops, something went wrong.