'How to use Beautiful Soup to select a specific span with a lot of childs?

Exception has occurred: NotImplementedError ':exclude' pseudo-class is not implemented at this time

I'm trying to webscrape a site but I keep getting the NotImplementedError when I'm executing this code down below. I'm assuming this is not working because BeautifulSoup does not have ':exclude'. The path down below is what I copied using the chrome browser.

soup.select('#objectWrapper8229 > wissearch:exclude > div:nth-child(1) > div.wp3-portlet-content > div > table > tbody > tr:nth-child(6) > td:nth-child(3) > span > a > span'


Solution 1:[1]

Indeed, after some research it seems that beautifulSoup does not have the exclude selector implemented. Maybe this post can help you with your exclusion issue.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 robinood