@ynetlabo/htmlanalyzer
Version:
a tool for the npm package to easily analysis a html document.
66 lines • 2.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArticleDoc = exports.AnalyzedDoc = exports.HTMLAnalyzer = void 0;
const HTMLAnalyzer_1 = require("./HTMLAnalyzer");
Object.defineProperty(exports, "HTMLAnalyzer", { enumerable: true, get: function () { return HTMLAnalyzer_1.HTMLAnalyzer; } });
const AnalyzedDoc_1 = require("./AnalyzedDoc");
Object.defineProperty(exports, "AnalyzedDoc", { enumerable: true, get: function () { return AnalyzedDoc_1.AnalyzedDoc; } });
Object.defineProperty(exports, "ArticleDoc", { enumerable: true, get: function () { return AnalyzedDoc_1.ArticleDoc; } });
// const otaru = HTMLAnalyzer.getAnalyzedDocByUrl(
// "https://otaru-aq.jp/choineta/news_taxonomy/oshirase",
// { selectQuery: ".news_list" },
// HTMLAnalyzer.DlTagAdapter
// );
// console.log(
// otaru.then((doc) => {
// doc.forEach((result) => {
// console.log(JSON.stringify(result));
// });
// })
// );
// const marine = HTMLAnalyzer.getAnalyzedDocByUrl(
// "https://marine-world.jp/news/",
// {
// selectQuery: ".item",
// titleSelector: ".label",
// descriptionSelector: "h3",
// dateSelector: ".date",
// },
// HTMLAnalyzer.CustomBlockAdapter
// );
// console.log(
// marine.then((doc) => {
// console.log(JSON.stringify(doc));
// })
// );
// const kyoto = HTMLAnalyzer.getAnalyzedDocByUrl(
// "https://www.kyoto-aquarium.com/news/",
// {
// selectQuery: ".archiveBlock li",
// titleSelector: ".title",
// descriptionSelector: ".title span:not(.date)",
// dateSelector: ".date",
// },
// HTMLAnalyzer.CustomBlockAdapter
// );
// console.log(
// kyoto.then((doc) => {
// console.log(JSON.stringify(doc));
// })
// );
// const marine = HTMLAnalyzer.getAnalyzedDocByUrl(
// "https://www.city.asahikawa.hokkaido.jp/asahiyamazoo/index.html",
// {
// selectQuery: ".block-news .content li",
// titleSelector: ".headline",
// descriptionSelector: ".headline",
// dateSelector: ".headline",
// },
// HTMLAnalyzer.CustomBlockAdapter
// );
// console.log(
// marine.then((doc) => {
// console.log(JSON.stringify(doc));
// })
// );
//# sourceMappingURL=index.js.map