php - Get youtube download link url_encoded_fmt_stream_map -
i using preg_match_all youtube video links youtube video page, , put them in array, don't result.
preg_match_all('/url_encoded_fmt_stream_map\=(.*)/', $html, $matches);
is there problem in syntax of first parameter?
thanks
don't use '=', need use ':' instead (if @ souce, see: "url_encoded_fmt_stream_map":)
so can use this:
preg_match('/url_encoded_fmt_stream_map(.*?);/', $html, $matches); $matches= substr($matches[0], 30, -1);
here delete last ';' , first '"url_encoded_fmt_stream_map":'.
Comments
Post a Comment