How to find the li tags with a specific class name but not others? For example:
li
... no wanted not his
You can simply do:
data = soup.find_all('li',{'class':'z'}) print(data)
If you only want to get text:
for a in data: print(a.text)