Gustavo
Gustavo

Reputation: 21

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 itself, but some pieces of information on how to achieve that.

Upvotes: 2

Views: 5966

Answers (1)

Paul
Paul

Reputation: 36329

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.

Upvotes: 2

Related Questions