Skip to the content.

Article Search using Python

Article Search using Python

from newspaper import Article
from IPython.display import display, Markdown

def add_emoji_to_text(text):
    emoji_dict = {
        "happy": "😊",
        "sad": "😢",
        "love": "❤️",
        "angry": "😠",
        "excited": "😃",
        "surprised": "😮",
        "victory": "🏆",
        "fire": "🔥",
        "warning": "⚠️",
        "science": "🔬",
        "streak": "🔥",
        "win": "🏆",
        "victory": "🏆",
        "defeat": "😢",
        "seconds": "⏱️",
        "minutes": "⏱️",
        "dutch": "🇳🇱",
        "norris": "🇬🇧",
        "netherlands": "🇳🇱",
        "flag": "🏁",
        "black": "⚫",
        "sneaker": "👟",
        "shoe": "👟",
        "violet": "🟣",
        "rich": "💰",
        "fall": "🍂",
        "design": "🎨",
        "colorway": "🎨"
    }
    
    words = text.split()
    
    new_words = []
    
    for word in words:
        lower_word = word.lower().strip(",.!")
        if lower_word in emoji_dict:
            new_word = word + " " + emoji_dict[lower_word]
        else:
            new_word = word
        new_words.append(new_word)
    
    modified_text = " ".join(new_words)
    
    return modified_text

urls = [
    "https://www.formula1.com/en/latest/article/norris-fights-back-against-verstappen-to-end-home-heros-run-of-dutch-gp-wins.3IPKJnhPnBEjWGAfrGeZQo",
    "https://houseofheat.co/jordan/a-ma-maniere-air-jordan-3-black-fz4811-001"
]

for url in urls:
    article = Article(url)
    article.download()
    article.parse()
    
    display(Markdown(f"### {article.title}"))
    display(Markdown(article.text))
    
    emoji_text = add_emoji_to_text(article.text)
    
    display(Markdown("### Modified Content with Emojis"))
    display(Markdown(emoji_text))
    
    print("\n")

2024 Dutch Grand Prix race report and highlights: Lando Norris fights back against Max Verstappen to end home hero’s run of Dutch GP wins

McLaren driver Lando Norris charged to a statement victory during the Dutch Grand Prix at Zandvoort, overhauling Max Verstappen after his Red Bull rival moved ahead at the start – and denying the Dutchman what would have been a fourth-straight home triumph.

Norris lined up on pole position for Sunday’s race but his hopes of converting it into the win took a hit when Verstappen jumped him off the line and slotted ahead at the first corner, before moving clear and breaking free of the DRS window.

However, Norris gathered himself to mount a fight back as the race developed, finding another level of pace – while Verstappen battled a mid-stint lack of grip – to close back in on the three-time world champion and reclaim a lead he would not relinquish.

Norris only extended his advantage before and after the front-runners’ sole pit stops of the day, eventually taking the chequered flag some 20 seconds clear of Verstappen to add to his Miami win from earlier this season and cut the latter’s championship lead.

Modified Content with Emojis

McLaren driver Lando Norris 🇬🇧 charged to a statement victory 🏆 during the Dutch 🇳🇱 Grand Prix at Zandvoort, overhauling Max Verstappen after his Red Bull rival moved ahead at the start – and denying the Dutchman what would have been a fourth-straight home triumph. Norris 🇬🇧 lined up on pole position for Sunday’s race but his hopes of converting it into the win 🏆 took a hit when Verstappen jumped him off the line and slotted ahead at the first corner, before moving clear and breaking free of the DRS window. However, Norris 🇬🇧 gathered himself to mount a fight back as the race developed, finding another level of pace – while Verstappen battled a mid-stint lack of grip – to close back in on the three-time world champion and reclaim a lead he would not relinquish. Norris 🇬🇧 only extended his advantage before and after the front-runners’ sole pit stops of the day, eventually taking the chequered flag 🏁 some 20 seconds ⏱️ clear of Verstappen to add to his Miami win 🏆 from earlier this season and cut the latter’s championship lead.

Where to Buy the A Ma Maniére x Air Jordan 3 “While You Were Sleeping”

Continuing their streak of highly coveted collaborations, A Ma Maniére and Jordan Brand are poised to release a third version of the Air Jordan 3 in 2024, in a striking “Black” colorway.

The A Ma Maniére x Air Jordan 3 “Black” is anticipated to drop alongside its “Burgundy Crush” counterpart in Fall 2024.

The color specifications for this darker version are listed as Black/Black/Flat Pewter/Violet Ore, suggesting a sneaker that’s both sleek and rich in detail.

Speculative mock-ups propose a sneaker with a black-based upper, using a combination of luxurious materials that have become synonymous with A Ma Maniére’s releases. Accents of Flat Pewter and Violet Ore are expected to provide a subtle yet impactful contrast, elevating the overall design.

Originally listed for release on July 18th, one can expect this colorway to arrive at Whitaker Group locations on August 21st, 2024, followed by a rollout on Nike SNKRS on August 27.

Modified Content with Emojis

Continuing their streak 🔥 of highly coveted collaborations, A Ma Maniére and Jordan Brand are poised to release a third version of the Air Jordan 3 in 2024, in a striking “Black” colorway. 🎨 The A Ma Maniére x Air Jordan 3 “Black” is anticipated to drop alongside its “Burgundy Crush” counterpart in Fall 🍂 2024. The color specifications for this darker version are listed as Black/Black/Flat Pewter/Violet Ore, suggesting a sneaker 👟 that’s both sleek and rich 💰 in detail. Speculative mock-ups propose a sneaker 👟 with a black-based upper, using a combination of luxurious materials that have become synonymous with A Ma Maniére’s releases. Accents of Flat Pewter and Violet 🟣 Ore are expected to provide a subtle yet impactful contrast, elevating the overall design. 🎨 Originally listed for release on July 18th, one can expect this colorway 🎨 to arrive at Whitaker Group locations on August 21st, 2024, followed by a rollout on Nike SNKRS on August 27.