zeeguu/core/content_retriever/content_cleaner.py
def cleanup_non_content_bits(text: str):
    """

        Sometimes newspaper still leaves some individual fragments
        in the article.text.


    :param text:
    :return:
    """
    new_text = text

    for junk_pattern in JUNK_PATTERNS:
        cleaned = new_text.replace(junk_pattern, "")

        if cleaned != new_text:
            print(f"- cleaned: {junk_pattern}")
            new_text = cleaned

    return new_text


        Sometimes newspaper still leaves some individual fragments
        in the article.text.


    :param text:
    :return:
    
Sometimes newspaper still leaves some individual fragments
in the article.text.
Sometimes newspaper still leaves some individual fragments in the article . text .
def cleanup_non_content_bits(text: str):
    new_text = text
    for junk_pattern in JUNK_PATTERNS:
        cleaned = new_text.replace(junk_pattern, "")
        if cleaned != new_text:
            print(f"- cleaned: {junk_pattern}")
            new_text = cleaned
    return new_text
def cleanup_non_content_bits ( text : str ) : new_text = text for junk_pattern in JUNK_PATTERNS : cleaned = new_text . replace ( junk_pattern , "" ) if cleaned != new_text : print ( f"- cleaned: {junk_pattern}" ) new_text = cleaned return new_text
Sometimes newspaper still leaves some individual fragments
in the article.text.
Sometimes newspaper still leaves some individual fragments in the article . text .
"""

        Sometimes newspaper still leaves some individual fragments
        in the article.text.


    :param text:
    :return:
    """
None
text
str
None