mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-09 12:51:45 -04:00
render: add "shell" option to --strip-mode
Some additional API changes: - Add strip-mode support to pdf/png generation. - Add LP.dump which provides greater content gathering capability to CDP, exposing most `fetch` dump-related parameters (e.g. format, strip, selector, ...) The new "--strip-mode shell" is designed to try to remove non-content elements such as the header and footer. The end goal is to use readibility.js test cases as a baseline, but this isn't a port of readibility.js. This is just the basic implementation of this, e.g removing a few key tags, e.g. <header>, <footer> and considering some specific roles. Even if --strip-mode shell is used, we might decide to stick with a whole dump: it's better to strip not enough than to strip too much. This currently works by measuring the ratio of non-link text of the stripped vs unstripped page.
This commit is contained in:
11 files changed
+447
-27
No files matched your search
File diff suppressed because one or more lines are too long.
Reference in new issue
Block a user