I am looping through table rows in a table, but the first 1 or 2 rows doesn\'t have the elements I am looking for (they are for table column headers etc.).
for td in tr.findChildren('td'):
img = td.findChild('img')
if img:
src = img.get('src', '') # return a blank string if there's no src attribute
if src:
# do something with src