I\'m trying to run the following script:
#!python
from urllib import urlopen #urllib.request for python3
from lxml import html
url = \'http://mpk.lodz.pl/roz
Your xpath expression will find
a td element that has a class which is not "naglczas"
You seem to want(since the only 3 td-s with a class have the same class you don't want)
a td element which does not have a class of "naglczas"
Those might sound similar, but they are different.
Something like
tree.xpath('//td[not(@class="naglczas")]')
should get you what you want.
Also, you don't need to use urllib to open the url, lxml can do that for you, using lxml.html.parse()
.