From: Alan J. Pippin <ajp@server.pippins.net>
Date: Fri, 18 Apr 2008 01:38:47 +0000 (-0600)
Subject: Fixed broken dailymotion embed video parser to match new webpage formatting
X-Git-Tag: 1_1_1~8
X-Git-Url: http://git.pippins.net/images/%7Blink_ppi%7D?a=commitdiff_plain;h=8870ef4a2301f397d4b71da6ac25f4e2e5564199;p=embedvideo%2F.git

Fixed broken dailymotion embed video parser to match new webpage formatting
---

diff --git a/ItemAddEmbedVideo.inc b/ItemAddEmbedVideo.inc
index 7103c37..ac3f12a 100644
--- a/ItemAddEmbedVideo.inc
+++ b/ItemAddEmbedVideo.inc
@@ -568,7 +568,7 @@ class ItemAddEmbedVideo extends ItemAddPlugin {
 	       }
 
 	       /* Extract the summary from the webpage contents */
-	       preg_match('/<div class="description  foreground">(.+?)<\/div>/i', $contents, $matches);
+	       preg_match('/<div class="description\s+foreground">(.+?)<\/div>/i', $contents, $matches);
 	       $summary=$matches[1];
 
 	       /* Extract the title from the webpage contents */
@@ -579,7 +579,7 @@ class ItemAddEmbedVideo extends ItemAddPlugin {
 	       $thumbnail=$dailymotionThumbnailUrl.$item_id;
 
 	       /* Format the description to hold a reference to the embedded video */
-	       if(preg_match('/Embeddable Player:.+?value="(.+?)"/', $contents, $matches)) { 
+	       if(preg_match('/<textarea id="video_player_embed_code_text".+?>(.+?)<\/textarea>/', $contents, $matches)) { 
 		 $description=$matches[1];
 		 $description=preg_replace("/&quot;/","'",$description);
 		 $description=preg_replace("/&lt;/","<",$description);