开发者

How to get the links from all the embedded videos on a webpage?

Let me explain. What I'm trying to do is, given a certain webpage I want to get the count of how many embedded videos and their links.

I'm not asking for the code 开发者_如何学JAVAitself, but some pieces of information on how to achieve that.


Embedded videos will be using <object> and <embed> tags. Pattern looks something like this:

<object width="550" height="400">
  <param name="movie" value="somefilename.swf">
  <embed src="somefilename.swf" width="550" height="400">
  </embed>
</object>

So if you use jquery, you could look for all elements of type object, and then get their param named "movie"'s value attribute. Or you could look for embed tags and their src attribute, either way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜