@jgarber/gocomics-open-graph
v0.1.0
Published
Parse Open Graph metadata from GoComics webpages.
Readme
@jgarber/gocomics-open-graph
Parse Open Graph metadata from GoComics webpages.
Installation
npm install --save @jgarber/gocomics-open-graphUsage
On the command line:
npx gocomics-open-graph calvinandhobbes 2025-09-01
# {"title":["Calvin and Hobbes by Bill Watterson for September 1, 2025 | GoComics"],"description":["Read Calvin and Hobbes—a comic strip by creator Bill Watterson—for today, September 1, 2025, and check out other great comics, too!"],"image":["https://featureassets.gocomics.com/assets/a118dba04f72013ead4c005056a9545d"],"image:width":["900"],"image:height":["287"],"image:alt":["Read Calvin and Hobbes by Bill Watterson on GoComics"]}
npx gocomics-open-graph nancy
# {"title":["Nancy by Olivia Jaimes for September 18, 2025 | GoComics"],"description":["Read Nancy—a comic strip by creator Olivia Jaimes—for today, September 18, 2025, and check out other great comics, too!"],"image":["https://featureassets.gocomics.com/assets/0fea1f906b20013eb193005056a9545d"],"image:width":["900"],"image:height":["251"],"image:alt":["Read Nancy by Olivia Jaimes on GoComics"]}In a JavaScript file:
import gocomicsOpenGraph from "@jgarber/gocomics-open-graph";
console.log(await gocomicsOpenGraph("calvinandhobbes", "2025-09-01"));
// {"title":["Calvin and Hobbes by Bill Watterson for September 1, 2025 | GoComics"],"description":["Read Calvin and Hobbes—a comic strip by creator Bill Watterson—for today, September 1, 2025, and check out other great comics, too!"],"image":["https://featureassets.gocomics.com/assets/a118dba04f72013ead4c005056a9545d"],"image:width":["900"],"image:height":["287"],"image:alt":["Read Calvin and Hobbes by Bill Watterson on GoComics"]}
console.log(await gocomicsOpenGraph("nancy"));
// {"title":["Nancy by Olivia Jaimes for September 18, 2025 | GoComics"],"description":["Read Nancy—a comic strip by creator Olivia Jaimes—for today, September 18, 2025, and check out other great comics, too!"],"image":["https://featureassets.gocomics.com/assets/0fea1f906b20013eb193005056a9545d"],"image:width":["900"],"image:height":["251"],"image:alt":["Read Nancy by Olivia Jaimes on GoComics"]}[!IMPORTANT] A full list of available titles may be found on GoComics' website.
[!NOTE] The
YYYY-MM-DD-formatted date argument is optional. If absent, the current date will be used. That value might be tomorrow depending on the time of day and time zone of the computer generating the date.
License
This project is freely available under the MIT License.
