Skip to content

summary() throws away lots of text at some websites #151

Open

Description

@yevgenpapernyk

e.g. at https://edition.cnn.com/2020/07/24/politics/donald-trump-coronavirus-briefing-jacksonville/index.html

A lot of the text content is unfortunately not present in the .summary() result.

Activity

  1. buriy commented on Jul 24, 2020

    @buriy
    Owner

    This happens sometimes, the algorithm has very limited knowledge about blocks of text, image captions, comments and ads, and might confuse them, especially if the text in the HTML is interleaved with other blocks. Unless you can point on a specific bug or suggest adding a special rule for this website (that wouldn't reduce quality on other websites), I can do nothing about it.

  2. adbar commented on Aug 5, 2020

    @adbar

    Same thing as in #150, you could try trafilatura which builds upon readability-lxml. I just tried and was able to extract the text you mentioned:

    • pip/pip3 install trafilatura
    • trafilatura -u "https://edition.cnn.com/2020/07/24/politics/donald-trump-coronavirus-briefing-jacksonville/index.html"

    If it doesn't work, please provide us with precise examples of text portions which don't get extracted as you expect, this really helps!

  3. reopened this on Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions