reddit/reddit-plugin-liveupdate — pull request #48 by umbrae (2014-04-04 18:14:45+00:00)
Title: Media embeds, take three

:eyeglasses: @spladug @chromakode

Hello hello and welcome to another episode of liveupdate media embeds!

This takes into account feedback from the previous PR and has a good deal of improvements. Primarily:

* `MediaByURL` is now used to fetch cached embeds across updates.
* Embedding/scraping logic has been gathered into one module, `media_embeds`
* Embeds are only rendered if the URL is on its own line (and additionally updates now render as block.)
* `liveupdate_q` has been clarified as the `liveupdate_scraper_q`

Still "outstanding": We haven't solved the redditmedia herd problem, but I'm wondering if we should cross that bridge when we get to it. It's a sticky problem, and since it's under redditmedia, that would mean it's going to be served through our CDN infrastructure anyhow, right? There's additionally a bit of kludginess when it comes to the MediaByURL caching, as you'll see inline. I'd be happy to volunteer to clean that up down the line, but I don't think it should block us from this work.

Thoughts appreciated, thanks for feedback on the previous PR. Keep in mind that you'll need [this pull request to allow differing widths](https://github.com/reddit/reddit-public/pull/2108) to be in your working copy of core if you want to test.