View Single Post
Old 12-11-2021, 03:51 AM   #1
unkn0wn
Guru
unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.
 
Posts: 625
Karma: 85520
Join Date: May 2021
Device: kindle
how to fetch images in soup

This is the html code in page.

Code:
/html/body/section/section/section/article/a/figure/picture 

<picture>
<source media="__" srcset="Actual link for image">
<img style="__" data-src="Image link"
</picture>
I am using below to fetch images.

Code:
for img in soup.findAll('img', attrs={'data-src'}):
            img['src'] = img['data-src']
        return soup
Above doesn't work, but html has the link to the image in .png extension.

How do i make it work
unkn0wn is online now   Reply With Quote