rss_converter_facebook.com.xsl: fix channel title, link and description
authorAntonio Ospite <ao2@ao2.it>
Sun, 13 Sep 2015 15:43:13 +0000 (17:43 +0200)
committerAntonio Ospite <ao2@ao2.it>
Sun, 13 Sep 2015 18:04:21 +0000 (20:04 +0200)
It looks like using the meta elements does not work anymore.

rss_converter_facebook.com.xsl

index b50be3d..9fbc187 100644 (file)
@@ -81,8 +81,8 @@
     </xsl:template>
 
     <xsl:template match="/">
     </xsl:template>
 
     <xsl:template match="/">
-        <xsl:variable name="channel-title" select="//meta[@property='og:title']/@content"/>
-        <xsl:variable name="channel-link" select="//meta[@property='og:url']/@content"/>
+        <xsl:variable name="channel-title" select="//title"/>
+        <xsl:variable name="channel-link" select="//div[contains(@class, 'userContentWrapper')][1]//a[1]/@href"/>
 
         <rss version="2.0">
             <xsl:attribute name="xml:base"><xsl:value-of select="$BaseURL" /></xsl:attribute>
 
         <rss version="2.0">
             <xsl:attribute name="xml:base"><xsl:value-of select="$BaseURL" /></xsl:attribute>
@@ -95,7 +95,9 @@
                     <xsl:value-of select="$channel-link"/>
                 </link>
                 <description>
                     <xsl:value-of select="$channel-link"/>
                 </link>
                 <description>
-                    <xsl:value-of select="normalize-space(//meta[@property='og:description']/@content)"/>
+                    <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
+                    <xsl:copy-of select="//div[@data-id='1']/node()"/>
+                    <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
                 </description>
                 <image>
                     <title>
                 </description>
                 <image>
                     <title>