2012-02-05, 08:34
More problems.
Portion of HTML I'm using: http://pastebin.com/C1imeTMG
My code:
Resulting portion of log: http://pastebin.com/zAbk89n9
In summary, only the first match in catDOM is non empty. All the rest are empty. Am I doing it correctly?
Thanks.
Portion of HTML I'm using: http://pastebin.com/C1imeTMG
My code:
Quote:suckerfishDOM = common.parseDOM(contents, "ul", attrs = { "id": "suckerfishnav"})[0]
catDOM = common.parseDOM(suckerfishDOM, "li", attrs = { "class": "cat-item cat-item-[0-9]{1,}"})
print 'Debug Info - catDOM length: ' + str(len(catDOM))
for dCat in catDOM:
print 'looping through catDOM'
print 'Debug Info: ' + dCat
if dCat is None or dCat == '':
continue
Resulting portion of log: http://pastebin.com/zAbk89n9
In summary, only the first match in catDOM is non empty. All the rest are empty. Am I doing it correctly?
Thanks.