dub
dub copied to clipboard
switch to node-html-parser for parsing
This PR makes the switch from ultrahtml
to node-html-parser
for parsing HTML, mainly because the former has some slight quirks in parsing weirdly-formatted attributes like content
in meta tags. It also utilizes the library's querySelector
API, and makes the codebase a tad bit more easy to read--and type safe--by reducing lines of code in the main logic. Using node-html-parser
also removes the need to manually escape HTML entities that causes the JSON response to sometimes break.