View Single Post
  #653  
Old 07-08-2009, 07:39 AM
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Location: MSK-RU
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Geek View Post
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.
  1. I use URL
    http://www.dailymotion.com/video/x9m63m_canarias-timelapse_creatio
  2. There in HTML Source I see:
    HTML Code:
        <link rel="canonical" href="/video/x9m63m_canarias-timelapse_creation" />[*]
  3. I am trying to get the needed video name from this line.
  4. 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?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01280 seconds
  • Memory Usage 1,788KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete