Exclude by class?


Great tool by the way.

A website I'd like to scrape has multiple div.main-body classes. There are variations of the class, for example div.main-body--latest

Is there a way to ignore or exclude div.main-body--latest?

So just to clarify but the div.main-body--latest has both that and div.main-body styles?
Try something along the lines of 'div.main-body:not(:has(.main-body--latest))'.

I scrape a site where I can get most of the info from the search page but some items are what I call grouped items(like 5-10 different models of the same item) and require me to follow a link to another page to get that info. I filter out those by using 'ul.products-grid li.item:not(:has(p:contains("Several configurations available.")))' as my selector. It basically says select the li.item if it doesn't have a p element containing the text 'Several configurations available.'

1 Like

Hi, thanks for taking the time to reply. I tweaked the example you provided and it works!

I used:


Thanks again!