如何从html文本中获取src信息

时间:2016-10-26 07:40:42

标签: python html beautifulsoup

我正在尝试使用python beautifulsoup从html数据中获取src信息 内容包含完整的HTML信息。从那我想得到图像的src信息。我尝试了下面的代码。

soup = BeautifulSoup(content,'lxml')
for table in soup.findAll('table', {'class':'table_x_write'} ):
    links=table.findAll('img',{'id':'imgsglx2'})            
    print links

以上代码打印 的 []

从这个如何获取src信息

请帮我解决这个问题

0 个答案:

没有答案