diff --git a/private/bin/importOldData.php b/private/bin/importOldData.php index b14dd74..2f6d260 100644 --- a/private/bin/importOldData.php +++ b/private/bin/importOldData.php @@ -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;