Class Projects - Spring 2016


Piquote scans news articles for the best quotes and photos and creates ready­to­Tweet graphics for you to share.

What it does

Research shows that tweets with images increase engagement, as measured by favorites, retweets, and URL clicks. Most mainstream news organizations tweet visuals along with links to their respective articles, but the cost of doing so is quite high, requiring a person to create one in Abobe Illustrator or Photoshop. Piquote automates the process by automatically sourcing the best quote from an article and presenting it alongside an image. It also gives the user an opportunity to customize their tweet by providing them with two quote selections and two graphic layouts including a plain background option instead of an image. Ideally, Piquote should be able to immediately share your result on Twitter or give you the option to save the image for later use.

How it works

Using BeautifulSoup and Flask, along with other technologies in a previous version of this project, we were able to parse the text of a given article by character to divide it up into quotes and sentences. Text patterns were also analyzed to correct punctuation and merge quotes over multiple sentences. These strings were then scored by the occurrence of keywords, specified in a repository we developed. The top strings of the right size were then selected. Images in the article were filtered by their size, file type, and parent div names. Aside from one image defined with a specific tag, the images chosen that met the above filters are random. The quote/image pairs are then sent to the front end, where they are displayed.

Key Technologies

  • Google JS api (Url Shortener)
  • Twitter Web Intent (Outgoing tweet)
  • Beautiful Soup (DOM Parser)

Next Steps

When we began working on Piquote, we were given a template of a previous project. Although the bones of the project were there, it did not pull proper quotes or images. In addition, there were an unnecessary and confusing number of options for users. Our goal was to streamline the process for users, improve the selection of quotes and images, and create a visually appealing product.

While we were largely successful as a team, there are a number of ways in which PicQuote might be improved.

Our original concept sought to allow users to Tweet the graphic, headline, and story URL directly from the Piquote site, but challenges with the Twitter API mean that only the headline and URL are tweetable (not a the graphic). Ideally we’d like to combine these two elements so users simply have to press “Tweet,” rather than save the graphic for use.

Also, while Piquote pulls relevant information from articles for the graphic, the process could be further refined. Since news websites use different tags in their HTML, a more rigorous analysis of these patterns would make Piquote a more universal tool. For example, while Piquote works exceptionally well on the Chicago Tribune, New York Times, and Washington Post, it does less well with The Atlantic and smaller entertainment sites.

Finally, a Piquote bookmarklet or web extension would allow users to simply press a Piquote button while reading an article to generate a graphic in a Tweet and eliminate the need for a separate Piquote webpage.

Numerous examples of graphics that were automatically generated, some containing an article image, others with a plain black background.

PicQuote's architecture.


Ashesha Mehrotra, Medill

Poroma Pant, Medill Master

Rudolf Newman, McCormick 

Alexis O’Connor, Medill