summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a46377b)
Adjust the XPath expressions to support both the classic and the new
profile pages.
<xsl:value-of disable-output-escaping="yes" select="php:function('Tweeper::generate_enclosure', string(./@data-expanded-url))"/>
</xsl:template>
<xsl:value-of disable-output-escaping="yes" select="php:function('Tweeper::generate_enclosure', string(./@data-expanded-url))"/>
</xsl:template>
- <xsl:variable name="screen-name" select="//div[@class='profile-card-inner']/@data-screen-name"/>
+ <xsl:variable name="screen-name" select="//div[@class='user-actions btn-group not-following ']/@data-screen-name"/>
- <xsl:template match="//div[@id='timeline']//ol[@id='stream-items-id']//li[@data-item-type='tweet']">
- <xsl:variable name="user-name" select=".//span[@class='username js-action-profile-name']/b"/>
- <xsl:variable name="tweet-text" select=".//p[@class='js-tweet-text tweet-text']"/>
+ <xsl:template match="//*[@data-item-type='tweet']">
+ <xsl:variable name="user-name" select=".//div[contains(@class, 'js-stream-tweet')]/@data-screen-name"/>
+ <xsl:variable name="tweet-text" select=".//p[contains(@class, 'js-tweet-text')]"/>
<item>
<title>
<xsl:value-of select="concat($user-name, ': ', $tweet-text)"/>
</title>
<link>
<item>
<title>
<xsl:value-of select="concat($user-name, ': ', $tweet-text)"/>
</title>
<link>
- <xsl:value-of select="concat($twitterBaseURL, .//a[@class='details with-icn js-details']/@href)"/>
+ <xsl:value-of select="concat($twitterBaseURL, .//a[contains(@class, 'js-permalink')]/@href)"/>
- <xsl:value-of select="php:functionString('Tweeper::epoch_to_gmdate', .//small[@class='time']//span/@data-time)"/>
+ <xsl:variable name="timestamp" select=".//span[contains(@class, 'js-short-timestamp')]/@data-time"/>
+ <xsl:value-of select="php:functionString('Tweeper::epoch_to_gmdate', number($timestamp))"/>
</pubDate>
<description>
<xsl:value-of select="concat($user-name, ': ')"/>
</pubDate>
<description>
<xsl:value-of select="concat($user-name, ': ')"/>
<xsl:value-of select="//a[@class='profile-picture media-thumbnail']/@href"/>
</url>
</image>
<xsl:value-of select="//a[@class='profile-picture media-thumbnail']/@href"/>
</url>
</image>
- <xsl:apply-templates select="//div[@id='timeline']//ol[@id='stream-items-id']//li[@data-item-type='tweet']"/>
+ <xsl:apply-templates select="//*[@data-item-type='tweet']"/>
</channel>
</rss>
</xsl:template>
</channel>
</rss>
</xsl:template>