1
2
3
4
5
6
7
8
9
export const parseCommonElementsExample = (
$: import("npm:cheerio@1.0.0-rc.12").CheerioAPI,
element: import("npm:cheerio@1.0.0-rc.12").Element,
) => ({
title: $(element).find("title").text(),
description: $(element).find("description, content").text(),
pubDate: $(element).find("pubDate, published, updated").first().text(),
mediaThumbnail: $(element).find("media\\:thumbnail, thumbnail").attr("url"),
});
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023