Routinely scraping CNN articles and reformatting them into anapest poems.
In this project, the homepage of CNN is scraped for linked articles, and the content of these articles is iterated through and processed based on certain rules. First, any words that conflict with the meter are removed, and some grammar rules are enforced. Additionally, the algorithm adds syntax and stanzas. This function is hosted in a Python script, which is executed routinely using CRON job scheduler. Poems are generated at 6:00, 12:00, and 18:00, then stored in a JSON on my Github repository. I fetch this file and display them below, while imitating the style of the original articles. On average, each web-scrape generates 25 poems. As such, this project generates roughly 75 poems per day. You can ready today's poems below!
1 Minute Read