There is a piece of HTML code of the page that I parse:
<td> <a class="soup" href="link">Борщ</a> </td> <td> <a class="soup" href="link">Рассольник</a> <br> <img src="/any.gif"> </br> </td> <td> <a class="soup" href="link">Грибной</a> </td> <td> <a class="soup" href="link">Щи</a> <br> <img src="/any.gif"> </br> </td> <td> <a class="soup" href="link">Молочный</a> </td> Question: how to collect all only those that are <br> <img> ?
How to collect all <td> in which there is <br> <img> ? (using BeautifulSoup )
<br/>this is an empty element in html — it cannot contain anything. BeautifulSoup of course can search for arbitrary criteria. - jfsрезультат = [элемент.атрибут for элемент in список]- jfs