I need to get inner text from p tags, inner text from h2 tags and inner html from img tags. Only this tags.
I tried such code:
tags = section.find_all(['p', 'img', 'h2' ])
but, first: i need not all "source" tags, only with special attributes second: i can`t use tag.text, because i need to get another attr from img
I can`t process tags separately too , because i need keep order.
How can i get:
First string
Second string
<img src="xxx.jpg">
Third string
from
<p>First string</p>
<p>Second string</p>
<img type="one" src="xxx.jpg">
<img type="two" src="yyy.jpg">
<p>Third string</p>