diff options
Diffstat (limited to 'templates/video.google.com/videopage.xsl')
-rw-r--r-- | templates/video.google.com/videopage.xsl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/video.google.com/videopage.xsl b/templates/video.google.com/videopage.xsl new file mode 100644 index 0000000..52d6d98 --- /dev/null +++ b/templates/video.google.com/videopage.xsl @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:str="http://exslt.org/strings"> + +<xsl:template match="/"> +<mediaurl> + <title><xsl:value-of select="/html/head/title" /></title> + <xsl:for-each select="/html/body/script"> + <xsl:variable name="videourl" select="str:decode-uri(substring-before(substring-after(., 'videoUrl\x3d'), '\x26'))"/> + <xsl:if test="$videourl"> + <url><xsl:value-of select="$videourl"/></url> + </xsl:if> + </xsl:for-each> +</mediaurl> +</xsl:template> + +</xsl:stylesheet> |