mgdm / htmlq

Like jq, but for HTML.
MIT License
7k stars 107 forks source link

[Feature request] #3

Closed Aeres-u99 closed 2 years ago

Aeres-u99 commented 4 years ago

I will truly appreciate an invert selector, something which will display everything else other than that. It will be very useful for excluding and remove weird javascript and google ads

mazznoer commented 2 years ago

Maybe --remove flag.

htmlq -f file.html --remove 'script' > clean.html

It will remove all selected elements, and output everything else. It will be very useful.

Aeres-u99 commented 2 years ago

Thanks a lot!

danimesq commented 2 years ago

@mazznoer, is it possible to append or change the content inside a tag id?