Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes embedded Instagram posts from articles #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterwilli
Copy link

Removes embedded Instagram posts from articles (which are often in a different language) (test article: http://www.huffingtonpost.com/entry/asian-models-victorias-secret-fashion-show_us_58420596e4b09e21702ec3e9)

Before fork, the text-variable held:

When xiaowen was on the stage and we were dancing with her at backstage 💃🏻💃🏻💃🏻 @liuwenlw @Mingxi11 #vsfs2016 #victoriasecrets #vsbackstage\n\nA photo posted by 何穗 sui he (@hesui923) on

But after this change, it's:

Compare that with the two Asian models, out of a total of 44 women, who were in the show last year.\n\nThe four Chinese models shared their excitement earlier this week by releasing a group photo of them posing, with peace signs raised, in front of the pink Victoria’s Secret banner in Paris.\n\nVictoria’s Secret had been criticized for not featuring a more racially diverse lineup of models over the course of the fashion show’s 21-year history. In fact, no Asian model had walked the VS runway until 2009, according to Yahoo Style.\n\nIn recent years, however, the lingerie giant has ramped up its efforts to be inclusive.\n\nLast year, Angolan model Maria Borges was the first black Victoria’s Secret model to wear natural hair down the runway. And this year, you can expect to see several models of color rocking a variety of natural tresses ― Afros, loose curls and all.\n\nThe lingerie brand’s decision to double down on Chinese models for the 2016 show may have been a strategic move as well, Yahoo Style reports.\n\nVictoria’s Secret slipped into the Chinese market in 2015 with beauty and accessory shops and, after seeing success in the market, announced plans to open its signature bra and panty stores in the country.\n\nAnd, as Reuters reported in July, the market for high-end lingerie in China has skyrocketed in five years, amounting to an $18 billion industry.\n\nVictoria’s Secret echoed the Chinese models’ excitement by posting a photo of three of them on their own account, greeting them with a traditional “Ni hao” on Instagram.\n\nCheck out a preview of Victoria’s Secret’s event in the photo gallery below, and tune in to CBS at 5 p.m. ET on Dec. 5 for the full runway show.

I had to create a new filter function (see cleanSelector), as I couldn't find a existing function to do this. Feedback is welcome 👍

@ageitgey
Copy link
Owner

This looks pretty reasonable to me. Can you add a test case for it with one of the affected articles?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants