From 56e3ccadf017b4642c4e81c44c222a37ede2e366 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 21 Sep 2022 12:16:13 +0800 Subject: [PATCH 1/3] Add test case for Axios AM newsletter --- packages/api/src/utils/parser.ts | 1 - .../axios-am/expected-metadata.json | 11 + .../newsletters/axios-am/expected.html | 227 +++++++++ .../newsletters/axios-am/source.html | 439 ++++++++++++++++++ .../test-pages/newsletters/axios-am/url.txt | 1 + 5 files changed, 678 insertions(+), 1 deletion(-) create mode 100644 packages/readabilityjs/test/test-pages/newsletters/axios-am/expected-metadata.json create mode 100644 packages/readabilityjs/test/test-pages/newsletters/axios-am/expected.html create mode 100644 packages/readabilityjs/test/test-pages/newsletters/axios-am/source.html create mode 100644 packages/readabilityjs/test/test-pages/newsletters/axios-am/url.txt diff --git a/packages/api/src/utils/parser.ts b/packages/api/src/utils/parser.ts index a1ec15678..01e97d0bd 100644 --- a/packages/api/src/utils/parser.ts +++ b/packages/api/src/utils/parser.ts @@ -262,7 +262,6 @@ export const parsePreparedContent = async ( const codeBlocks = article.dom.querySelectorAll('code') if (codeBlocks.length > 0) { codeBlocks.forEach((e) => { - console.log(e.textContent) if (e.textContent) { const att = hljs.highlightAuto(e.textContent) const code = dom.createElement('code') diff --git a/packages/readabilityjs/test/test-pages/newsletters/axios-am/expected-metadata.json b/packages/readabilityjs/test/test-pages/newsletters/axios-am/expected-metadata.json new file mode 100644 index 000000000..a78a10d05 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/axios-am/expected-metadata.json @@ -0,0 +1,11 @@ +{ + "title": "Axios Finish Line", + "byline": null, + "dir": null, + "excerpt": "Start and end your work day with the stories that matter from Axios by Mike Allen, the world’s most-wired reporter. Then finish the night with what matters -- and lasts -- in life with insights from Mike, Jim VandeHei and Erica Pandey.", + "siteName": null, + "previewImage": "https://static.axios.com/img-email/socialcard_axiosam3.jpg", + "publishedDate": null, + "language": "English", + "readerable": true +} diff --git a/packages/readabilityjs/test/test-pages/newsletters/axios-am/expected.html b/packages/readabilityjs/test/test-pages/newsletters/axios-am/expected.html new file mode 100644 index 000000000..ee1a9c900 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/axios-am/expected.html @@ -0,0 +1,227 @@ +
+
+ +
+ +   + + + + + + +   + + + + Presented By Pfizer + + + +   + + + + Axios AM Thought Bubble + + + + + By Mike Allen · Sep 20, 2022 + + + + +

Good morning. Here's Axios world reporter Dave Lawler with what you need to know about today's opening of the UN General Assembly gathering in New York.

+
    +
  • Smart Brevity™ count: 414 words ... a 2-minute read.
  • +
+ + + +   + + +   + + + + 1 big thing: Ukraine dominates UN General Assembly + + + + + Illustration of country name placards at the UN with microphones, with Ukraine's microphone bigger than all others. + + + + + + + + +

Illustration: Aïda Amer/Axios

+
+ + + +   + + + +

NEW YORK — The war in Ukraine is set to dominate this week's UN General Assembly meeting, overshadowing other global dilemmas like food security, climate change and other political and humanitarian crises around the world.

+

Why it matters: The Biden administration is intent on keeping up the pressure on Moscow, but some developing countries and aid groups have expressed concern that diplomatic skirmishes over the war will undermine a key opportunity to address other crises that deserve attention.

+

What they're saying: Stéphane Dujarric, spokesperson for Secretary-General António Guterres, said the war "does take up a lot of the space" and can make it harder to build momentum and consensus on other issues.

+
    +
  • Ecuadorian President Guillermo Lasso told Axios in an interview that the focus on Ukraine is understandable — as long as the big powers recognize that the knock-on effects of soaring food and fuel prices are hitting smaller, poorer countries hardest.
  • +
  • However, Linda Thomas-Greenfield, U.S. ambassador to the UN, argued ahead of the summit that those concerns were misplaced, as the war "will not be the only thing that we're dealing with." The U.S. and African and European Unions will co-host a summit on food security, for example.
  • +
+

Driving the news: Kicking off the six-day procession of speeches just now, Guterres called attention to the array of crises unfolding "far from the spotlight" — from Ethiopia, to Haiti, to Myanmar and beyond.

+
    +
  • He also acknowledged that rather than taking collective action, the international community — and the UN itself — had been "paralyzed" by "geopolitical divides."
  • +
  • That paralysis will be on display Thursday, when Secretary of State Tony Blinken, Russian Foreign Minister Sergey Lavrov and their counterparts are expected to discuss Ukraine at the UN Security Council. Russia is outnumbered on the council, but wields a veto.
  • +
+

The big picture: The UN General Assembly is back at full force for the first time in three years.

+
    +
  • The past two annual gatherings were derailed by COVID-19, but the pandemic has slipped down the agenda and most delegates are wandering UN HQ maskless.
  • +
+

What to watch: President Biden forfeited the prime U.S. speaking slot this morning (always second after Brazil) to travel back from Queen Elizabeth II's funeral, and will instead speak on Wednesday.

+
    +
  • China and Russia won't address the forum until Saturday, because both Xi Jinping and Vladimir Putin are staying home, and ministerial-level officials get the later speaking slots.
  • +
  • Ukrainian President Volodymyr Zelensky, however, is slated to address the forum remotely on Wednesday.
  • +
+ + + + + + + + + + + +   + + +   + + + +

A message from Pfizer

+ + + + + An Accord for a Healthier World + + + +   + + + + + + + +   + + + +

People living in lower income countries are disproportionately impacted by disease, causing lasting social and economic consequences.

+

Through an Accord for a Healthier World, we’re working to close the health equity gap.

+

We believe better health is possible for everyone, everywhere.

+ + + +   + + + +
+ + + HQ + + +
+ + +

Are you a fan of this email format?

+

It's called Smart Brevity®. Over 300 orgs use it — in a tool called Axios HQ — to drive productivity with clearer workplace communications.

+ + +
+ + +
+ + +
+ + +
+ +   + + + + +

Axios thanks our partners for supporting our newsletters. If you’re interested in advertising, learn more here.
Sponsorship has no influence on editorial content.

+
+ Axios, 3100 Clarendon B‌lvd, Arlington VA 22201 + + + +   + + + + You received this email because you signed up for newsletters from Axios.
+ Change your preferences or unsubscribe here. +
+ + + +   + + + + Was this email forwarded to you?
+ Sign up now to get Axios in your inbox.
+ + + +   + + + +

Follow Axios on social media:

+ Axios on Facebook + Axios on Twitter + Axios on Instagram + + + +   + + + +   + +
+ + +
+
\ No newline at end of file diff --git a/packages/readabilityjs/test/test-pages/newsletters/axios-am/source.html b/packages/readabilityjs/test/test-pages/newsletters/axios-am/source.html new file mode 100644 index 000000000..4e4149f13 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/axios-am/source.html @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ Crowding out other crises | Tuesday, September 20, 2022 +
+ + + + +
+ + + + + + + + +
 
Axios Logo  Alerts
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ + + + +
+ View in browser +
+
 
+ Presented By Pfizer +
 
+ Axios AM Thought Bubble +
+ By + Mike Allen + · + Sep 20, 2022 + +
+

Good morning. Here's Axios world reporter Dave Lawler with what you need to know about today's opening of the UN General Assembly gathering in New York.

  • Smart Brevity™ count: 414 words ... a 2-minute read.
+
 
 
+ + 1 big thing: Ukraine dominates UN General Assembly + +
+ Illustration of country name placards at the UN with microphones, with Ukraine's microphone bigger than all others. +
+ +

Illustration: Aïda Amer/Axios

+
+
 
+

NEW YORK — The war in Ukraine is set to dominate this week's UN General Assembly meeting, overshadowing other global dilemmas like food security, climate change and other political and humanitarian crises around the world.

Why it matters: The Biden administration is intent on keeping up the pressure on Moscow, but some developing countries and aid groups have expressed concern that diplomatic skirmishes over the war will undermine a key opportunity to address other crises that deserve attention.

What they're saying: Stéphane Dujarric, spokesperson for Secretary-General António Guterres, said the war "does take up a lot of the space" and can make it harder to build momentum and consensus on other issues.

  • Ecuadorian President Guillermo Lasso told Axios in an interview that the focus on Ukraine is understandable — as long as the big powers recognize that the knock-on effects of soaring food and fuel prices are hitting smaller, poorer countries hardest.
  • However, Linda Thomas-Greenfield, U.S. ambassador to the UN, argued ahead of the summit that those concerns were misplaced, as the war "will not be the only thing that we're dealing with." The U.S. and African and European Unions will co-host a summit on food security, for example.

Driving the news: Kicking off the six-day procession of speeches just now, Guterres called attention to the array of crises unfolding "far from the spotlight" — from Ethiopia, to Haiti, to Myanmar and beyond.

  • He also acknowledged that rather than taking collective action, the international community — and the UN itself — had been "paralyzed" by "geopolitical divides."
  • That paralysis will be on display Thursday, when Secretary of State Tony Blinken, Russian Foreign Minister Sergey Lavrov and their counterparts are expected to discuss Ukraine at the UN Security Council. Russia is outnumbered on the council, but wields a veto.

The big picture: The UN General Assembly is back at full force for the first time in three years.

  • The past two annual gatherings were derailed by COVID-19, but the pandemic has slipped down the agenda and most delegates are wandering UN HQ maskless.

What to watch: President Biden forfeited the prime U.S. speaking slot this morning (always second after Brazil) to travel back from Queen Elizabeth II's funeral, and will instead speak on Wednesday.

  • China and Russia won't address the forum until Saturday, because both Xi Jinping and Vladimir Putin are staying home, and ministerial-level officials get the later speaking slots.
  • Ukrainian President Volodymyr Zelensky, however, is slated to address the forum remotely on Wednesday.
+
+ Share on Facebook + Tweet this Story + Post to LinkedIn + Email this Story +
 
 
+

+ A message from Pfizer +

+
+ An Accord for a Healthier World +
 
+ +
 
+

People living in lower income countries are disproportionately impacted by disease, causing lasting social and economic consequences.

+

Through an Accord for a Healthier World, we’re working to close the health equity gap.

+

We believe better health is possible for everyone, everywhere.

+
 
+ + + + + +
+ HQ + + + + + +
+
Are you a fan of this email format?
+ It's called Smart Brevity®. Over 300 orgs use it — in a tool called Axios HQ — to drive productivity with clearer workplace communications.
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ +

Axios thanks our partners for supporting our newsletters. If you’re interested in advertising, learn more here. +
Sponsorship has no influence on editorial content.

+
+ + Axios, 3100 Clarendon B‌lvd, Arlington VA 22201 + +
 
+ + You received this email because you signed up for newsletters from Axios.
+ Change your preferences or unsubscribe here. +
+
 
+ + Was this email forwarded to you?
+ Sign up now to get Axios in your inbox. +
+
 
+

Follow Axios on social media:

+ Axios on Facebook + Axios on Twitter + Axios on Instagram +
 
 
+ + +
+
+                                               +
+ + diff --git a/packages/readabilityjs/test/test-pages/newsletters/axios-am/url.txt b/packages/readabilityjs/test/test-pages/newsletters/axios-am/url.txt new file mode 100644 index 000000000..765ea46a6 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/axios-am/url.txt @@ -0,0 +1 @@ +https://link.axios.com/view/624d3447776363102d0b2208hbv6u.bdsb/95d21d5c \ No newline at end of file From 99dad48dd151293bbd70cc75d9cc8b2a65006e8a Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Thu, 22 Sep 2022 22:13:49 +0800 Subject: [PATCH 2/3] Add Axios Chicago test case --- .../axios-chicago/expected-metadata.json | 11 + .../newsletters/axios-chicago/expected.html | 570 +++++++++++++ .../newsletters/axios-chicago/source.html | 775 ++++++++++++++++++ .../newsletters/axios-chicago/url.txt | 1 + 4 files changed, 1357 insertions(+) create mode 100644 packages/readabilityjs/test/test-pages/newsletters/axios-chicago/expected-metadata.json create mode 100644 packages/readabilityjs/test/test-pages/newsletters/axios-chicago/expected.html create mode 100644 packages/readabilityjs/test/test-pages/newsletters/axios-chicago/source.html create mode 100644 packages/readabilityjs/test/test-pages/newsletters/axios-chicago/url.txt diff --git a/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/expected-metadata.json b/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/expected-metadata.json new file mode 100644 index 000000000..a24fead2d --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/expected-metadata.json @@ -0,0 +1,11 @@ +{ + "title": "Axios Chicago", + "byline": null, + "dir": null, + "excerpt": "A daily look at the most significant and interesting stories affecting Chicago. Written by Monica Eng and Justin Kauffman.", + "siteName": null, + "previewImage": "https://static.axios.com/img/axios-site/axios-local-chicago.png", + "publishedDate": null, + "language": "English", + "readerable": true +} diff --git a/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/expected.html b/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/expected.html new file mode 100644 index 000000000..5cd356359 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/expected.html @@ -0,0 +1,570 @@ +
+
+ + + +
+ +   + + + + + + +   + + + + Presented By Facebook + + + +   + + + + Axios Chicago + + + + + By Justin Kaufmann and Monica Eng ·Feb 14, 2022 + + + + +

💘 Happy Monday! It's Valentine's Day. The last-minute rush is on to buy something for your loved ones. Or not. We don't judge.

+
    +
  • Today's weather: Warming up! Partly sunny with a high of 27 and a slight chance of snow.
  • +
+

Today's newsletter is 873 words — a 3-minute read.

+ + + +   + + +   + + + + 1 big thing: The (former) candy capital of the world + + + + + A little boy watches candy bars being made at the Curtiss plant in Chicago, 1961. + + + + + + + + +

A boy watches candy bars being made at the Curtiss Candy plant in Chicago, 1961. Photo: Bettmann/Getty Images

+
+ + + +   + + + +

Chicago was once known as the candy capital of the world. But the remaining industry is now a (chocolate) shell of what it was.

+

Why it matters: At one time, more than 1,000 local candy companies supplied Chicagoans with relatively high-paying jobs. The industry, driven by immigrants and the river and railroads bringing in affordable corn syrup and sugar, stayed strong for more than a century.

+ +

💝 This Valentine's Day, we want to take current stock of the industry by breaking down which companies are still operating in town.

+

Mars/Wrigley: The company just announced plans to shutter its West Side candy plant, reassigning 280 jobs.

+ +

Tootsie Roll Industries: The famed chewy chocolate candy is made on the South Side. They moved headquarters here in 1966.

+
    +
  • This facility also makes Tootsie Pops and Dots.
  • +
  • Tours are available.
  • +
+

Ferrara Pan (now Ferrero): Chicago's Ferrara Pan was bought by European giant Ferrero, which owns Nutella.

+
    +
  • Its headquarters are in the old Post Office building, but the main attraction is the outlet store in Forest Park.
  • +
  • They make millions of Lemonheads per day as well as Red Hots and Now and Laters.
  • +
+

Blommer Chocolate Company: One of the last remaining chocolate factories in the downtown area, Blommer is known less for its candy than for the intoxicating smell its plant produces.

+ +

Cupid Candies: The South Side factory started in 1936, but the Western Avenue location closed in 2020 after the death of its owner.

+ +

What's next: Even with these losses, the candy industry, represented by the Sweets & Snacks Expo, is returning in May.

+

💭 Monica's thought bubble: My step-grandmother Carmela came to Chicago from Peru in the 1960s and found work at the Curtiss Candy factory. It kept her grandkids plentifully supplied for years with Baby Ruths and Butterfingers.

+ + + + + + + + + + + +   + + +   + + + + 2. LaVine sees specialist + + + + + Zach LaVine flies through the air during a win against the Timberwolves on Friday night. + + + + + + + + +

Zach LaVine flies through the air during a win against the Timberwolves on Friday night. Photo: David Banks/Getty Images

+
+ + + +   + + + +

The Bulls got bad news yesterday.

+
    +
  • Zach LaVine is seeing a specialist in Los Angeles about his ailing knee, according to ESPN.
  • +
+

Why it matters: LaVine is a two-time All-Star averaging almost 25 points a game, and the Bulls didn't make any trades at last week's deadline.

+

Driving the news: LaVine has played on his sore left knee for a few games but sat out Saturday night during a win over Oklahoma City. He already missed games this season due to the injury, though a recent MRI revealed no structural damage.

+
    +
  • He still wants to play in the All-Star game this weekend, per ESPN sources.
  • +
+

Context: The Bulls have played short-handed this season without injured contributors Lonzo Ball, Alex Caruso and Patrick Williams.

+
    +
  • They also lead the league in players who have missed time due to COVID protocols.
  • +
+

What's next: The Bulls still hold the No. 2 seed in the Eastern Conference, just a game behind the Miami Heat. They play the Spurs tonight at the United Center.

+ + + + + + + + + + + +   + + +   + + + + 3. Tips and hot links + + + + + Illustration of sign that says tips and hot links. + + + + + + + + +

Illustration: Brendan Lynch/Axios

+
+ + + +   + + + +

🏫 CPS wants you to choose when your kids go back next year. Spoiler alert: both options are before Labor Day. (Chalkbeat Chicago)

+

👩‍⚖️ Closing arguments in the Ald. Patrick Daley Thompson fraud trial are expected today. (Chicago Tribune)

+

💉 The White Sox are the first MLB team to require minor league players to get the COVID-19 booster. (Axios)

+

🏀 Congratulations to Whitney Young for winning the boys basketball city championship! (Chicago Sun-Times)

+ + + + + + + + + + + +   + + +   + + + + +

A message from Facebook

+ + + + + We’re making investments in safety and security — and seeing results + + + +   + + + + + + + +   + + + +

Facebook has invested $13 billion over the last 5 years to help keep you safe. Since July, we’ve taken action on:

+
    +
  • 34.7M pieces of explicit adult content.
  • +
  • 26.6M pieces of violent and graphic content.
  • +
  • 9.8M pieces of terrorism-related content.
  • +
+

See how we're working to help you connect safely.

+ + + +   + + +   + + + + Job board + + + + + 💗 Find the perfect match for your career path + + + + +

See what’s new on our job board.

+
    +
  1. Human Resources Business Partner at Enfusion.
  2. +
  3. Managing Editor, Alt-Meat / Senior Editor, Meatingplace at Alt-Meat.
  4. +
  5. Associate Multimedia and Center Communications Specialist at Discover.
  6. +
+

Want more opportunities? Check out our Job Board.

+

Hiring? Post a Job.

+ + + + + + + + + + + +   + + + +
+ + + HQ</> + + +
+ + + + Advertise with Axios Local + + + + + +

Over 500,000 readers now wake up to Axios Local in their inbox. You can reach these smart professionals in their hometown.

+ + + + +

+

+ + +
+ + +
+ + + +   + + + + 4. Your Chicago marketing slogans + + + + + Illustration of the Chicago skyline with word balloons filled with exclamation points popping up over it. + + + + + + + + +

Illustration: Brendan Lynch/Axios

+
+ + + +   + + + +

We recently reported on the criticism surrounding the city's new marketing slogan: "Chicago not in Chicago," which some find confusing and way too focused on other cities.

+
    +
  • We asked you for better, or just more amusing, alternatives. As always, you did not disappoint.
  • +
+

😜 Sunil G: Chicago: We don't want nobody that nobody sent

+

🏛 Mike N: Bureaucracy Is Beautiful

+

🗯 Patrick D: Please f*ck off

+

🧀 Peter B: At least it’s warmer than Green Bay

+

🤔 Jerry C: You don't understand us, and that's ok

+

☃️ Matt T: Come for the political corruption and stay for the snow in April

+

🌊 Nathan G: Giving St. Louis all of our sh*t since 1900

+

❤️ Kelly M: Calling Dibs on Your Heart (in time for Valentine's Day)

+

🗞 Tom N: Where people fold their newspaper, not their pizza

+

👃 Miranda S: Where Each Block Has a Unique Smell

+
    +
  • 🍁 Culture, Cuisine, and Cannabis
  • +
+

Go deeper for more funny slogans.

+ + + + + + + + + + + +   + + +   + + + + 5. Photos of the day: St. Valentine's Day Massacre + + + + + Photo of a block in 1929. + + + + + + + + +

The 2100 block of North Clark Street in February, 1929. Photo: Bettmann Archive/Getty Images

+
+ + + +   + + + +

Today marks the 93rd anniversary of the infamous St. Valentine's Day Massacre.

+
    +
  • This photo shows the block where the shootings happened. The building on the right was a rooming house where Al Capone's gangsters rented a room to spy on the garage where Bugs Moran's gangsters hung out.
  • +
  • The garage where the shootings took place is on the left, between the laundry and tailor shop signs.
  • +
+

Zoom in: Today, this block is in the heart of Lincoln Park. That rooming house is now the restaurant Riccardo Trattoria.

+

+

The 2100 block of North Clark Street in February 2022. Photo: Justin Kaufmann/Axios

+ + + + + + + + + + + +   + + +   + + + +

A message from Facebook

+ + + + + We’re making investments in safety and security — and seeing results + + + +   + + + + + + + +   + + + +

Facebook has invested $13 billion over the last 5 years to help keep you safe. Since July, we’ve taken action on:

+
    +
  • 34.7M pieces of explicit adult content.
  • +
  • 26.6M pieces of violent and graphic content.
  • +
  • 9.8M pieces of terrorism-related content.
  • +
+

See how we're working to help you connect safely.

+ + + +   + + + +

Our picks:

+

🎤 Monica recently heard about Chicago's Bev Rage and the Drinks from a reader. Now she can't get enough of this drag queen garage pop. Expect a new album out this year.

+

🌶 Justin skipped the chocolate this year and went with spicy, cinnamon-flavored gummy bears for his 14-year-old son. Why not live a little?

+

Want free Axios swag? Refer your friends to Axios Chicago and get cool merch like stickers, totes, hats, T-shirts and more!

+ + + + +
+ + + HQ + + +
+ + + Like this email style and format? +

Bring the strength of Smart Brevity® to your team — more effective communications, powered by Axios HQ.

+ + +
+ + +
+ + +
+ + +
+ +   + + + + +

Axios thanks our partners for supporting our newsletters. If you’re interested in advertising, learn more here.
Sponsorship has no influence on editorial content.

+
+ Axios, 3100 Clarendon B‌lvd, Suite 1300, Arlington VA 22201 + + + +   + + + + You received this email because you signed up for newsletters from Axios.
+ Change your preferences or unsubscribe here. +
+ + + +   + + + + Was this email forwarded to you?
+ Sign up now to get Axios in your inbox.
+ + + +   + + + +

Follow Axios on social media:

+ Axios on Facebook + Axios on Twitter + Axios on Instagram + + + +   + + + +   + +
+ + + + +
+
\ No newline at end of file diff --git a/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/source.html b/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/source.html new file mode 100644 index 000000000..4d3413e41 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/source.html @@ -0,0 +1,775 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ Plus: 🌆 Your best city slogans | Monday, February 14, 2022 +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ + + + + +
+ Axios + + Open in app + View in browser +
+
 
+Presented By Facebook + +
 
+ Axios Chicago +
+By +Justin Kaufmann and Monica Eng +·Feb 14, 2022 +
+

💘 Happy Monday! It's Valentine's Day. The last-minute rush is on to buy something for your loved ones. Or not. We don't judge.

  • Today's weather: Warming up! Partly sunny with a high of 27 and a slight chance of snow.

Today's newsletter is 873 words — a 3-minute read.

+
 
 
+ +1 big thing: The (former) candy capital of the world + +
+ A little boy watches candy bars being made at the Curtiss plant in Chicago, 1961. +
+ +

A boy watches candy bars being made at the Curtiss Candy plant in Chicago, 1961. Photo: Bettmann/Getty Images

+
+
 
+

Chicago was once known as the candy capital of the world. But the remaining industry is now a (chocolate) shell of what it was.

Why it matters: At one time, more than 1,000 local candy companies supplied Chicagoans with relatively high-paying jobs. The industry, driven by immigrants and the river and railroads bringing in affordable corn syrup and sugar, stayed strong for more than a century.

💝 This Valentine's Day, we want to take current stock of the industry by breaking down which companies are still operating in town.

Mars/Wrigley: The company just announced plans to shutter its West Side candy plant, reassigning 280 jobs.

Tootsie Roll Industries: The famed chewy chocolate candy is made on the South Side. They moved headquarters here in 1966.

  • This facility also makes Tootsie Pops and Dots.
  • Tours are available.

Ferrara Pan (now Ferrero): Chicago's Ferrara Pan was bought by European giant Ferrero, which owns Nutella.

  • Its headquarters are in the old Post Office building, but the main attraction is the outlet store in Forest Park.
  • They make millions of Lemonheads per day as well as Red Hots and Now and Laters.

Blommer Chocolate Company: One of the last remaining chocolate factories in the downtown area, Blommer is known less for its candy than for the intoxicating smell its plant produces.

Cupid Candies: The South Side factory started in 1936, but the Western Avenue location closed in 2020 after the death of its owner.

What's next: Even with these losses, the candy industry, represented by the Sweets & Snacks Expo, is returning in May.

💭 Monica's thought bubble: My step-grandmother Carmela came to Chicago from Peru in the 1960s and found work at the Curtiss Candy factory. It kept her grandkids plentifully supplied for years with Baby Ruths and Butterfingers.

+
+ Share on Facebook + Tweet this Story + Post to LinkedIn + Email this Story +
 
 
+ +2. LaVine sees specialist + +
+ Zach LaVine flies through the air during a win against the Timberwolves on Friday night. +
+ +

Zach LaVine flies through the air during a win against the Timberwolves on Friday night. Photo: David Banks/Getty Images

+
+
 
+

The Bulls got bad news yesterday.

  • Zach LaVine is seeing a specialist in Los Angeles about his ailing knee, according to ESPN.

Why it matters: LaVine is a two-time All-Star averaging almost 25 points a game, and the Bulls didn't make any trades at last week's deadline.

Driving the news: LaVine has played on his sore left knee for a few games but sat out Saturday night during a win over Oklahoma City. He already missed games this season due to the injury, though a recent MRI revealed no structural damage.

  • He still wants to play in the All-Star game this weekend, per ESPN sources.

Context: The Bulls have played short-handed this season without injured contributors Lonzo Ball, Alex Caruso and Patrick Williams.

  • They also lead the league in players who have missed time due to COVID protocols.

What's next: The Bulls still hold the No. 2 seed in the Eastern Conference, just a game behind the Miami Heat. They play the Spurs tonight at the United Center.

+
+ Share on Facebook + Tweet this Story + Post to LinkedIn + Email this Story +
 
 
+ +3. Tips and hot links + +
+ Illustration of sign that says tips and hot links. +
+ +

Illustration: Brendan Lynch/Axios

+
+
 
+

🏫 CPS wants you to choose when your kids go back next year. Spoiler alert: both options are before Labor Day. (Chalkbeat Chicago)

👩‍⚖️ Closing arguments in the Ald. Patrick Daley Thompson fraud trial are expected today. (Chicago Tribune)

💉 The White Sox are the first MLB team to require minor league players to get the COVID-19 booster. (Axios)

🏀 Congratulations to Whitney Young for winning the boys basketball city championship! (Chicago Sun-Times)

+
+ Share on Facebook + Tweet this Story + Post to LinkedIn + Email this Story +
 
 
+ +

+ A message from Facebook +

+
+ We’re making investments in safety and security — and seeing results +
 
+ +
 
+

Facebook has invested $13 billion over the last 5 years to help keep you safe. Since July, we’ve taken action on:

+
  • 34.7M pieces of explicit adult content.
  • +
  • 26.6M pieces of violent and graphic content.
  • +
  • 9.8M pieces of terrorism-related content.
+

See how we're working to help you connect safely.

+
 
 
+ Job board +
+ +💗 Find the perfect match for your career path + +
+

See what’s new on our job board.

  1. Human Resources Business Partner at Enfusion.
  2. Managing Editor, Alt-Meat / Senior Editor, Meatingplace at Alt-Meat.
  3. Associate Multimedia and Center Communications Specialist at Discover.

Want more opportunities? Check out our Job Board.

Hiring? Post a Job.

+
+ Share on Facebook + Tweet this Story + Post to LinkedIn + Email this Story +
 
+ + + + + +
+ HQ + + + + + + + + + + + +
+ +Advertise with Axios Local + +
+
Over 500,000 readers now wake up to Axios Local in their inbox. You can reach these smart professionals in their hometown.
+
+ + +
+
+
 
+ +4. Your Chicago marketing slogans + +
+ Illustration of the Chicago skyline with word balloons filled with exclamation points popping up over it. +
+ +

Illustration: Brendan Lynch/Axios

+
+
 
+

We recently reported on the criticism surrounding the city's new marketing slogan: "Chicago not in Chicago," which some find confusing and way too focused on other cities.

  • We asked you for better, or just more amusing, alternatives. As always, you did not disappoint.

😜 Sunil G: Chicago: We don't want nobody that nobody sent

🏛 Mike N: Bureaucracy Is Beautiful

🗯 Patrick D: Please f*ck off

🧀 Peter B: At least it’s warmer than Green Bay

🤔 Jerry C: You don't understand us, and that's ok

☃️ Matt T: Come for the political corruption and stay for the snow in April

🌊 Nathan G: Giving St. Louis all of our sh*t since 1900

❤️ Kelly M: Calling Dibs on Your Heart (in time for Valentine's Day)

🗞 Tom N: Where people fold their newspaper, not their pizza

👃 Miranda S: Where Each Block Has a Unique Smell

  • 🍁 Culture, Cuisine, and Cannabis

Go deeper for more funny slogans.

+
+ Share on Facebook + Tweet this Story + Post to LinkedIn + Email this Story +
 
 
+ +5. Photos of the day: St. Valentine's Day Massacre + +
+ Photo of a block in 1929. +
+ +

The 2100 block of North Clark Street in February, 1929. Photo: Bettmann Archive/Getty Images

+
+
 
+

Today marks the 93rd anniversary of the infamous St. Valentine's Day Massacre.

  • This photo shows the block where the shootings happened. The building on the right was a rooming house where Al Capone's gangsters rented a room to spy on the garage where Bugs Moran's gangsters hung out.
  • The garage where the shootings took place is on the left, between the laundry and tailor shop signs.

Zoom in: Today, this block is in the heart of Lincoln Park. That rooming house is now the restaurant Riccardo Trattoria.

The 2100 block of North Clark Street in February 2022. Photo: Justin Kaufmann/Axios
+
+ Share on Facebook + Tweet this Story + Post to LinkedIn + Email this Story +
 
 
+

A message from Facebook +

+
+ We’re making investments in safety and security — and seeing results +
 
+ +
 
+

Facebook has invested $13 billion over the last 5 years to help keep you safe. Since July, we’ve taken action on:

+
  • 34.7M pieces of explicit adult content.
  • +
  • 26.6M pieces of violent and graphic content.
  • +
  • 9.8M pieces of terrorism-related content.
+

See how we're working to help you connect safely.

+
 
+

Our picks:

🎤 Monica recently heard about Chicago's Bev Rage and the Drinks from a reader. Now she can't get enough of this drag queen garage pop. Expect a new album out this year.

🌶 Justin skipped the chocolate this year and went with spicy, cinnamon-flavored gummy bears for his 14-year-old son. Why not live a little?

Want free Axios swag? Refer your friends to Axios Chicago and get cool merch like stickers, totes, hats, T-shirts and more!

+
+ + + + + +
+ HQ + + + + + +
+ Like this email style and format? +
Bring the strength of Smart Brevity® to your team — more effective communications, powered by Axios HQ.
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ +

Axios thanks our partners for supporting our newsletters. If you’re interested in advertising, learn more here. +
Sponsorship has no influence on editorial content.

+
+ +Axios, 3100 Clarendon B‌lvd, Suite 1300, Arlington VA 22201 + +
 
+ +You received this email because you signed up for newsletters from Axios.
+Change your preferences or unsubscribe here. +
+
 
+ +Was this email forwarded to you?
+Sign up now to get Axios in your inbox. +
+
 
+

Follow Axios on social media:

+ Axios on Facebook + Axios on Twitter + Axios on Instagram +
 
 
+ + +
+ + + + + + + diff --git a/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/url.txt b/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/url.txt new file mode 100644 index 000000000..3a0f7372e --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/axios-chicago/url.txt @@ -0,0 +1 @@ +https://link.axios.com/view/620a4aa717e6565ad1452bd8fwcaa.xvt/23d9abe3 \ No newline at end of file From 0239103fc4b86ceac4699e519b28c663328b4f71 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Thu, 22 Sep 2022 22:16:03 +0800 Subject: [PATCH 3/3] Remove the table with text content less than 20 because these are ads --- packages/api/src/utils/axios-handler.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/api/src/utils/axios-handler.ts b/packages/api/src/utils/axios-handler.ts index 868181c85..00f6ff86a 100644 --- a/packages/api/src/utils/axios-handler.ts +++ b/packages/api/src/utils/axios-handler.ts @@ -11,9 +11,11 @@ export class AxiosHandler { prehandle = (url: URL, dom: Document): Promise => { const body = dom.querySelector('table') + let isFooter = false // this removes ads and replaces table with a div - body?.querySelectorAll('table').forEach((el, k) => { - if (k > 0) { + body?.querySelectorAll('table').forEach((el) => { + // remove the footer and the ads + if (!el.textContent || el.textContent.length < 20 || isFooter) { el.remove() } else { // removes the first few rows of the table (the header) @@ -28,6 +30,8 @@ export class AxiosHandler { const div = dom.createElement('div') div.innerHTML = el.innerHTML el.parentNode?.replaceChild(div, el) + // set the isFooter flag to true because the next table is the footer + isFooter = true } })