projects
/
tweeper.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debian/control: remove unnecessary versioned dependency on pkg-php-tools
[tweeper.git]
/
src
/
rss_converter_facebook.com.xsl
diff --git
a/src/rss_converter_facebook.com.xsl
b/src/rss_converter_facebook.com.xsl
index
933d3d2
..
7ead3ef
100644
(file)
--- a/
src/rss_converter_facebook.com.xsl
+++ b/
src/rss_converter_facebook.com.xsl
@@
-1,7
+1,7
@@
<!--
Stylesheet to convert a Facebook public page to RSS.
<!--
Stylesheet to convert a Facebook public page to RSS.
- Copyright (C) 2015 Antonio Ospite <ao2@ao2.it>
+ Copyright (C) 2015
-2018
Antonio Ospite <ao2@ao2.it>
This file is part of tweeper.
This file is part of tweeper.
@@
-33,7
+33,6
@@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl"
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl"
- xsl:extension-element-prefixes="php"
exclude-result-prefixes="php">
<xsl:output method="xml" indent="yes"/>
exclude-result-prefixes="php">
<xsl:output method="xml" indent="yes"/>
@@
-52,7
+51,7
@@
name="page-id"
select="substring-after(//meta[@property='al:android:url']/@content, 'fb://page/')"/>
name="page-id"
select="substring-after(//meta[@property='al:android:url']/@content, 'fb://page/')"/>
- <xsl:template match="//div[contains(@class, 'userContentWrapper')]">
+ <xsl:template match="//div[contains(@class, '
fbUserStory') or contains(@class, '
userContentWrapper')]">
<xsl:variable name="story-id" select=".//input[@name='ft_ent_identifier']/@value"/>
<xsl:variable
name="item-permalink"
<xsl:variable name="story-id" select=".//input[@name='ft_ent_identifier']/@value"/>
<xsl:variable
name="item-permalink"
@@
-106,7
+105,8
@@
<xsl:template match="/">
<xsl:variable name="channel-title" select="//title"/>
<xsl:template match="/">
<xsl:variable name="channel-title" select="//title"/>
- <xsl:variable name="channel-link" select="//div[contains(@class, 'userContentWrapper')][1]//a[1]/@href"/>
+ <xsl:variable name="channel-link" select="//meta[@property='og:url']/@content"/>
+ <xsl:variable name="channel-image" select="//meta[@property='og:image']/@content"/>
<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>
@@
-120,7
+120,7
@@
</link>
<description>
<xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text>
</link>
<description>
<xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text>
- <xsl:
copy-of select="//div[@data-id='1']/node()
"/>
+ <xsl:
value-of select="//meta[@property='og:description']/@content
"/>
<xsl:text disable-output-escaping="yes">]]></xsl:text>
</description>
<image>
<xsl:text disable-output-escaping="yes">]]></xsl:text>
</description>
<image>
@@
-131,10
+131,10
@@
<xsl:value-of select="$channel-link"/>
</link>
<url>
<xsl:value-of select="$channel-link"/>
</link>
<url>
- <xsl:value-of select="
//img[@class='profilePic img']/@src
"/>
+ <xsl:value-of select="
$channel-image
"/>
</url>
</image>
</url>
</image>
- <xsl:apply-templates select="//div[contains(@class, 'userContentWrapper')]"/>
+ <xsl:apply-templates select="//div[contains(@class, '
fbUserStory') or contains(@class, '
userContentWrapper')]"/>
</channel>
</rss>
</xsl:template>
</channel>
</rss>
</xsl:template>