如果是获取优酷的话应该是获取XMzUzNzc1Njgw
这部分内容吧
其实我觉得正则解析网址就是最方便直接的办法了啊,为什么你还要想着别的办法?
我这个是PHP的,不过稍微改一下python也能用啦~
preg_match_all("/id_(.*).html/U",$url,$youku,PREG_PATTERN_ORDER);
return '<p><embed pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="isShowRelatedVideo=false&VideoIDS=' . $youku[1][0] . '&isAutoPlay=false&isDebug=false&UserID=0&RecordCode=1001,1002,1003,1004,1005,1006,2001,3001,3002,3003,3004,3005,3007,3008,9999&RecordResource=index&isLoop=false&winType=index&playMovie=true&MMControl=true&MMout=true" wmode="transparent" quality="high" bgcolor="#FFFFFF" name="index_player_swf" id="index_player_swf" src="http://static.youku.com/v1.0.0141/v/swf/qplayer.swf" type="application/x-shockwave-flash"></p>';