用 Readability 解析 HTML,返回文章对象或 null
(html: string, url: string)
| 52 | |
| 53 | /** 用 Readability 解析 HTML,返回文章对象或 null */ |
| 54 | function parseWithReadability(html: string, url: string) { |
| 55 | const { document } = parseHTML(absolutifyUrls(html, url)) |
| 56 | return new Readability(document).parse() |
| 57 | } |
| 58 | |
| 59 | /** 从 __NEXT_DATA__ JSON 中递归寻找最长的文章 HTML 字符串和标题 |
| 60 | * |
no test coverage detected