rss_converter_twitter.com.xsl: improve matching the permalink
authorAntonio Ospite <ao2@ao2.it>
Tue, 5 May 2015 07:28:23 +0000 (09:28 +0200)
committerAntonio Ospite <ao2@ao2.it>
Tue, 5 May 2015 07:28:23 +0000 (09:28 +0200)
Extract the permalink using the @data-permalink-path attribute, this
works for withheld tweets too preventing them from having all the same
guid.

rss_converter_twitter.com.xsl

index 9efc769..77b6666 100644 (file)
@@ -41,7 +41,7 @@
     <xsl:template match="//*[@data-item-type='tweet' and @role='listitem']">
         <xsl:variable name="user-name" select=".//div[contains(@class, 'js-stream-tweet')]/@data-screen-name"/>
         <xsl:variable name="item-content" select=".//p[contains(@class, 'js-tweet-text')]"/>
-        <xsl:variable name="item-permalink" select="concat($BaseURL, .//a[contains(@class, 'js-permalink')]/@href)"/>
+        <xsl:variable name="item-permalink" select="concat($BaseURL, .//div[@data-permalink-path]/@data-permalink-path)"/>
         <item>
             <title>
                 <xsl:value-of select="concat($user-name, ': ', $item-content)"/>