projects
/
embedvideo
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eb0134d
)
Fixed broken dailymotion embed video parser to match new webpage formatting
author
Alan J. Pippin
<ajp@server.pippins.net>
Fri, 18 Apr 2008 01:38:47 +0000
(19:38 -0600)
committer
Alan J. Pippin
<ajp@pippins.net>
Fri, 18 Apr 2008 01:38:47 +0000
(19:38 -0600)
ItemAddEmbedVideo.inc
patch
|
blob
|
history
diff --git
a/ItemAddEmbedVideo.inc
b/ItemAddEmbedVideo.inc
index 7103c3715ecc234aced11a029baa43ac49b8ac4e..ac3f12ad3d83091c4ea61e318440e957614ef3e7 100644
(file)
--- a/
ItemAddEmbedVideo.inc
+++ b/
ItemAddEmbedVideo.inc
@@
-568,7
+568,7
@@
class ItemAddEmbedVideo extends ItemAddPlugin {
}
/* Extract the summary from the webpage contents */
}
/* 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 */
$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 */
$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("/"/","'",$description);
$description=preg_replace("/</","<",$description);
$description=$matches[1];
$description=preg_replace("/"/","'",$description);
$description=preg_replace("/</","<",$description);