Thanks to visit codestin.com
Credit goes to github.com

Skip to content

错失了最好的 content #120

@zlj-zz

Description

@zlj-zz

bug的现象

内容标签 class=content,代码进行了加权。内容中只包含了 <br>,预处理后正文内容为纯字符串。

    def need_skip_ltgi(self, ti, lti):

        if lti == 0:
            return False

        return ti // lti > 10  # 正文的字符数量是链接字符数量的十倍以上

lti == 0 导致 density = 0,最终的分数为 0。最后从父级标签提取内容,包含了不必要的内容。

<div class="content1">
	我是正文我是正文我是正文
	<br />
	我是正文我是正文我是正文
	<br />
	我是正文我是正文我是正文
	<br />
	我是正文我是正文我是正文
	<br />
	我是正文我是正文我是正文
	<br />
</div>

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions