Split parsing CLI options from parsing QUERY_STRING ones
[tweeper.git] / rss_converter_twitter.com.xsl
index c7f03c2..280342e 100644 (file)
         <xsl:text>https://twitter.com</xsl:text>
     </xsl:variable>
 
+    <xsl:template match="a[@data-expanded-url]">
+        <xsl:value-of disable-output-escaping="yes" select="php:function('generate_enclosure', string(./@data-expanded-url))"/>
+    </xsl:template>
+
     <xsl:variable name="screen-name" select="//div[@class='profile-card-inner']/@data-screen-name"/>
 
     <xsl:template match="//div[@id='timeline']//ol[@id='stream-items-id']//li[@data-item-type='tweet']">
@@ -49,7 +53,7 @@
                 <xsl:copy-of select="$tweet-text/node()"/>
                 <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
             </description>
-            <xsl:value-of disable-output-escaping="yes" select="php:function('generate_enclosure', string(.//a[@class='twitter-timeline-link']/@data-expanded-url))"/>
+            <xsl:apply-templates select="$tweet-text//a[@data-expanded-url]"/>
         </item>
     </xsl:template>