是否有正则表达式让youtube从YouTube视频页面链接中嵌入代码?让youtube从youtube链接嵌入视频代码?
我想literaly这个问题的反面: Getting youtube links from embedded youtube video on pages?
编辑: 我需要的代码类似如下:
public static String GetYoutubeEmbedCode(String YoutubeLink)
{
String SourceLink = /* Something involving YoutubeLink*/;
String YoutubeEmbedCode = "<object width=\"640\" height=\"385\"><param name=\"movie\" value=\"" + SourceLink + "\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"" + SourceLink + "\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"640\" height=\"385\"></embed></object>";
return YoutubeEmbedCode;
}
你能告诉我们源文本是什么样子吗?然后你在寻找什么? – Keng 2010-11-10 17:48:59