-1
desc = re.compile('<ul class="descShort bullet">(.*)</ul>', re.DOTALL)
findDesc = re.findall(desc, link_source)
for i in findDesc:
print i
'''
<ul class="descShort bullet">
Sleek and distinctive, these eye-catching ornaments will be the star of your holiday decor. These unique glass icicle ornaments are individually handcrafted by artisans in India.
</ul>
'''
我试图提取ul类标记和/ ul之间的描述。我正在寻找使用REGEX的soltuion,以及beautifulsoup。python re.compile美丽的汤
我想至少你尝试* *使用HTML解析器......但不幸的你还在使用正则表达式来解析HTML。 –
我是这个网站的新手,我该如何去做呢?谢谢! – phales15
查看[您的问题列表](http://stackoverflow.com/users/1018129/aaron-phalen?tab=questions);如果对他们中的任何人都有很好的答案,请点击旁边的勾号的轮廓。 – egor83