| Plagger documentation | view source | Contained in the Plagger distribution. |
Plagger::Plugin::Filter::FindEnclosures - Auto-find enclosures from entry content using <a> / <embed> tags
- module: Filter::FindEnclosures
This plugin finds enclosures from $entry->body by finding 1)
<a> links with rel="enclosure" attribute, 2) <a>
links to any URL which filename extensions match with known
audio/video formats and 3) src attributes in <img> and <embed> tags.
For example:
Listen to the <a href="http://example.com/foobar.mp3">Podcast</a> now, or <a rel="enclosure" href="http://example.com/foobar.m4a">download AAC version</a>. <img src="/img/logo.gif" />
Those 3 links (foobar.mp3, foobar.m4a and logo.gif) are extracted as enclosures, while logo.gif is marked as "inline", so that they won't appear as enclosures in Publish::Feed.
You might want to also use Filter::HEADEnclosureMetadata plugin to know the actual length (bytes-length) of enclosures by sending HEAD requests.
Tatsuhiko Miyagawa
Masahiro Nagano
| Plagger documentation | view source | Contained in the Plagger distribution. |