我正在尝试使用 BeautifulSoup 来获取与某个链接相关的图像大小。使用:
match="http://www.something.com" link in soup.findAll("a",href=str(match))
我得到
<a href="http://www.something.com"><img alt="Immagine" class="aligncenter size-large wp-image-4405" height="263" src="http://www.infographiclov.com/Immagine-500x263.jpg" width="500"/></a>
我能够获得 href,但我想获得 img alt 高度和宽度。有任何想法吗?谢谢
千万里不及你
相关分类