python beautifulsoup findall p标记

2024-06-08 20:15:20 发布

您现在位置:Python中文网/ 问答频道 /正文

def GetDescription(self, Soup):

descriptionList = []

description = str(Soup.find('div', class='productDescriptionSource').findAll('p'))

print description

由于class,我收到错误。我需要越狱角色吗?如何做?谢谢!在


Tags: selfdiv角色def错误descriptionfindclass