Why BeautifulSoup is not adding style attribute to image?

前端 未结 0 577
一生所求
一生所求 2020-12-20 15:05

I am trying to add style to image elements using BeautifulSoup as below

for img in soup.find_all(\'img\'):
            img[\'style\'] = "max-width: 100%;         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题