Correzioni importOldData per video youtube
This commit is contained in:
@@ -85,14 +85,14 @@ $dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass");
|
||||
if ( preg_match("~^http[s]?[:]//youtu\.be/(.+)$~", trim($ele->img), $matches) ){
|
||||
$media->link = $matches[1];
|
||||
}
|
||||
else if (preg_match("~http[s]?[:]//www\.youtube\.com/embed/([^\"]+)[\"]~", trim($ele->img), $matches)){
|
||||
else if (preg_match("~http[s]?[:]//www\.youtube\.com/embed/([^\"]++)~", trim($ele->img), $matches)){
|
||||
$media->link = $matches[1];
|
||||
}
|
||||
else if (preg_match("~http[s]?[:]//www\.youtube\.com/watch[?]v[=](.+)$~", trim($ele->img), $matches)){
|
||||
$media->link = $matches[1];
|
||||
}
|
||||
// LEGACY FORMAT http://www.youtube.com/v/c0B1snrcoPk&hl=it_IT&fs=1&
|
||||
else if (preg_match("~http[:]//www\.youtube\.com/v/(.+)[&]amp[;]hl[=]it_IT[&]amp[;]fs[=]1[&]amp[;]$~", trim($ele->img), $matches)){
|
||||
else if (preg_match("~http[:]//www\.youtube\.com/v/([^&]++)~", trim($ele->img), $matches)){
|
||||
$media->link = $matches[1];
|
||||
}
|
||||
// $media->link = $ele->img;
|
||||
|
||||
Reference in New Issue
Block a user