Skip to content

Article fail to pick some content #32

@guojiangwei2

Description

@guojiangwei2
html_content = """<P>&nbsp;&nbsp;&nbsp;&nbsp;最近一个月内,三圣股份共计登上龙虎榜1次,表明三圣股份股性一般。 (<A href='http://stock.jrj.com.cn/share,002742,lhb.shtml' target=_blank>更多龙虎榜查询请点击</A>)</P><P>&nbsp;&nbsp;&nbsp;&nbsp;公司主要从事    建材化工、医药。</P>"""
article = Article(html_content)
print(article.main_text)  # pick nothing
from lxml import etree
html = etree.HTML(html_content)
html.xpath('//text()')   # pick target content successfully

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions