[Python2.7] [爬虫] [BeautifulSoup],如图,使用soup.find()查找到目标后,怎样提取其中的content?

大神们帮我问一下,[Python2.7] [爬虫] [BeautifulSoup],如图,使用soup.find()查找到目标后,怎样提取其中的content?
最新回答
微光

2024-11-25 07:51:33

方法1.==》不用find ,直接 print soup.meta['content']
方法2.==》print meta['content']
ps:注意页面有多个meta 标签的情况
追问
想请问一下,我爬一系列网页,发现前面是压缩的,后面又不是的了,怎样才能自动判断呢?
唇角那吻痕

2024-11-25 07:52:25

Print meta.content