Python Iterator Reference + lxml
I have this script -
import lxml
from lxml.cssselect import CSSSelector
from lxml.etree import fromstring
from lxml.html import parse
website = parse('http://example.com').getroot()
selector = website.cssselect('.name')
for i in range(0,18):
print selector[i].text_content()
As you can see, the for loop stops after a few times, which I asked beforehand. I want the for loop to stop only after it has printed everything.
+1
bobcom
a source
to share