From c9a2dafe2a6dc59641c5b02817e3b574f0924930 Mon Sep 17 00:00:00 2001 From: Antti Ajanki Date: Tue, 18 Sep 2012 21:50:19 +0300 Subject: Youtube fixes --- templates/www.youtube.com/description.xsl | 2 +- templates/www.youtube.com/navigation.xsl | 2 +- templates/www.youtube.com/video.xsl | 93 +++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 templates/www.youtube.com/video.xsl diff --git a/templates/www.youtube.com/description.xsl b/templates/www.youtube.com/description.xsl index b8cc9b9..83e53d2 100644 --- a/templates/www.youtube.com/description.xsl +++ b/templates/www.youtube.com/description.xsl @@ -64,7 +64,7 @@ - wvt:///www.youtube.com/videopage.xsl?srcurl=http://www.youtube.com/watch?v= + wvt:///www.youtube.com/video.xsl?srcurl=http://www.youtube.com/get_video_info?%26video_id=%26el=detailpage%26ps=default%26eurl=%26gl=US%26hl=en diff --git a/templates/www.youtube.com/navigation.xsl b/templates/www.youtube.com/navigation.xsl index 0dd1fd8..43ffd45 100644 --- a/templates/www.youtube.com/navigation.xsl +++ b/templates/www.youtube.com/navigation.xsl @@ -11,7 +11,7 @@ - wvt:///www.youtube.com/videopage.xsl?srcurl=http://www.youtube.com/watch?v= + wvt:///www.youtube.com/video.xsl?srcurl=http://www.youtube.com/get_video_info?%26video_id=%26el=detailpage%26ps=default%26eurl=%26gl=US%26hl=en wvt:///www.youtube.com/description.xsl?srcurl= diff --git a/templates/www.youtube.com/video.xsl b/templates/www.youtube.com/video.xsl new file mode 100644 index 0000000..c78d4ab --- /dev/null +++ b/templates/www.youtube.com/video.xsl @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <xsl:variable name="titleparam"> + <xsl:choose> + <xsl:when test="contains(substring-after($videoinfo, '&title='), '&')"> + <xsl:value-of select="substring-before(substring-after($videoinfo, '&title='), '&')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="substring-after($videoinfo, '&title=')"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:value-of select="str:decode-uri(str:replace($titleparam, '+', ' '))"/> + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3