Search code examples
phpcurlweb-scrapingmeta

extraxcting meta tags from yahoo videos


$url="https://screen.yahoo.com/popular/ice-t-voiceover-every-cartoon-182055140.html";
$tags = get_meta_tags($url);
print_r($tags);

the result is

Array ( [description] => #YahooLive is proud to present this exclusive concert from Los Lonely Boys on Friday, July 31, 2015. Catch the show live or tune in for a full 24 hour rebroadcast. [application-name] => Yahoo Screen [msapplication-tilecolor] => #6e329d [p:domain_verify] => 423db4d61a29a437435ff00f86aa220e ) 

am not able to get all tags including og can anyone help?


Solution

  • The answer is in the documentation:

    http://php.net/manual/en/function.get-meta-tags.php

    Note:

    Only meta tags with name attributes will be parsed. Quotes are not required.

    To get all the meta tags, you will probably have to parse the HTML yourself. You can use a parser like Simple HTML DOM or similar.