Beautifulsoup iterating through scraped data I have this html code that is repeating multiple times:
     &lt;div class=&quot;Company_line-logo image-loader-target&quot; data-image-loader-height=&quot;47&quot; data-image-loader-height-mobile=&quot;47&quot; data-image-loader-src=&quot;/var/fiftyPartners/storage/images/startups/woleet/3261-1-fre-FR/Woleet_company_line_logo.png&quot; data-image-loader-src-mobile=&quot;/var/fiftyPartners/storage/images/startups/woleet/3261-1-fre-FR/Woleet_company_line_logo_mobile.png&quot; data-image-loader-width=&quot;189&quot; data-image-loader-width-mobile=&quot;189&quot; style='background-image:url(&quot;http://en.50partners.fr/var/fiftyPartners/storage/images/startups/woleet/3261-1-fre-FR/Woleet_company_line_logo.png&quot;);'&gt;&lt;/div&gt;   
&lt;h5 class=&quot;Company_line-title&quot;&gt;Woleet&lt;/h5&gt;
        &lt;div class=&quot;Company_line-description&quot;&gt;

By using:
    for blocks in soup:
        block = soup.find('a', class_='Company_line logo-contains-name').find('h5').get_text()

I can get what I want that is &quot;Woleet&quot; in between the h5 tags.
I tried to iterate this to get all of them:
    block = soup.find('a', class_='Company_line logo-contains-name')
    for name in block:
        names = block.find_all('h5')

it returns only 1
h5 class=&quot;Company_line-title&quot;&gt;Woleet&lt;/h5
whereas I should get 50 names like &quot;Woleet&quot;.
How can I iterate this and get the text from all h5 tags?
Thanks!
I could iterate and get the text from all the h5 tags with this code:
    main_block = soup.find(class_='Node_full startups content_class_folder')
    block = [h5.get_text() for h5 in main_block.find_all('h5', class_='Company_line-title')]

I'm wondering if there is another way to extract the text from the h5 tags.