From 75a54e3a1e1d61dc7c04ec5664b286984dd84adc Mon Sep 17 00:00:00 2001 From: Antonio Ospite <ao2@ao2.it> Date: Fri, 20 May 2016 14:04:03 +0200 Subject: [PATCH] rss_converter_twitter.com.xsl: generate enclosure for images --- rss_converter_twitter.com.xsl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl index dbbc537..857cf31 100644 --- a/rss_converter_twitter.com.xsl +++ b/rss_converter_twitter.com.xsl @@ -107,6 +107,10 @@ <xsl:copy-of select="php:function('Tweeper::generateEnclosure', string(./@data-expanded-url))"/> </xsl:template> + <xsl:template match="div[@data-image-url]" mode="enclosure"> + <xsl:copy-of select="php:function('Tweeper::generateEnclosure', string(concat(./@data-image-url, ':orig')))"/> + </xsl:template> + <xsl:variable name="screen-name" select="//div[@class='user-actions btn-group not-following ']/@data-screen-name"/> <xsl:template match="//li[@data-item-id and @data-item-type='tweet']"> @@ -155,6 +159,7 @@ </description> <xsl:if test="$generate-enclosure = 1"> <xsl:apply-templates select="$item-content//a[@data-expanded-url]" mode="enclosure"/> + <xsl:apply-templates select="$item-media//div[@data-image-url]" mode="enclosure"/> </xsl:if> </item> </xsl:template> -- 2.1.4