-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