Quote:
Originally Posted by The Geek
You only use the Embedding Regexp if the data needed to embed cannot be found within the URL itself.
For example:
if the embed code for www.myvideo.com/watch.php?v=123456 looks like:
<embed src="http://www.myvideo.com/watch.php?v=abcdef" ... />
In this instance, the URL doesnt 'tie up' to the embed HTML so AME needs to go to www.myvideo.com/watch.php?v=123456 and find the abcdef part. With the Embedding Regexp, AME pulls down the page and runs something like:
http://www\.myvideo\.com/watch\.php\?v=(\w+)
Which grabs the abcdef part so the video will properly embed.
In the event that the URL contains the information you need (i.e. the dailymotion definition I just posted) then this process is redundant and a time waster. Furthermore, the Embedding Regexp is generally different than the regexp used to match the URL in the first place.
Hope this helps.
|
The Geek, 1st, I am much appreciated that you speak with me.
2nd, I understand that for the current moment the dailymotion can work only with "Regular expression". This is 100% clear for me.
3rd, I am just trying based on dailymotion to make it working also with "Extract destination data".
As I understand this one can be done so?
And at this point I meet with the problem.
Here is my test case.
- I use URL
http://www.dailymotion.com/video/x9m63m_canarias-timelapse_creatio
- There in HTML Source I see:
HTML Code:
<link rel="canonical" href="/video/x9m63m_canarias-timelapse_creation" />[*]
- I am trying to get the needed video name from this line.
- So I make:
- Regular expression
PHP Code:
http://[w\.]*dailymotion\.[com|alice\.it]+/[\w/\-%]*video/([\w\-]+)
- Extract destination data
Yes
- Embedding Regexp
PHP Code:
<link rel="canonical" href="/video/([a-z_0-9-]+)"
- I also tried:
PHP Code:
href="/video/([a-z_0-9-]+)"
And this one doesn't work.
I am trying to understand - why?
What I am doing wrong?