Skip to content Skip to sidebar Skip to footer

Beautiful Soup 4 CSS Selector Does Not Work The Same Way The Tutorial Show

I run the sample CSS selector codes from [Beautiful Soup 4 tutorial page][1], but the results are different, some give the correct result, some do not. In the website, they say it

Solution 1:

I've figured out your problem. You are using a version of BeautifulSoup that is older than 4.3.2.

I just had 4.1.2 installed, and I ran your code. I had the same problem, I got an empty list, now that I've updated it to 4.3.2, I get the list of siblings again.

You can install it via pip, but you can also get the latest version from Pypi and download it.


Post a Comment for "Beautiful Soup 4 CSS Selector Does Not Work The Same Way The Tutorial Show"