To exclude elements, set the attribute: data-content-exclude<div data-content-include>children</div>
<div data-content-exclude>children</div>
Good to know: To ensure that these attributes work properly, they should be placed as close as possible to the element (HTML tag) you wish to include or exclude, so that the rule takes precedence over any other inclusion or exclusion rules you set up yourself.Some examples of rules for excluding or including : I want to exclude an item :
I would like to include an item :<div data-content-exclude>Content to exclude</div>
I want to exclude an item that was previously included :<div data-content-include>Content to include</div>
I would like to include an item that was previously excluded:<div data-content-include><p>This paragraph</p><p data-content-exclude>The paragraph I wish to exclude.</p></div>The</p>element will be excluded.
<div data-content-exclude><p>Paragraph that will be excluded</p><h2 data-content-include>The paragraph I want to keep.</h2></div>The<h2>element will be retained.
Good to know: If an element contains both attributes (data-content-include and data-content-exclude), the exclusion takes precedence and the content is deleted.Your technical teams can now work autonomously to improve your content extractor.