mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 13:59:29 +00:00
Fix an issue in analysis
This commit is contained in:
parent
235940ad33
commit
49a86e1443
@ -48,11 +48,20 @@ class URLAnalyzer {
|
||||
if(preg_match("/property/", $entry) AND preg_match("/og:/", $entry)){
|
||||
|
||||
//Search for property tag and content tag
|
||||
preg_match("#property=[\"\']og:(.*?)[\"\']#is", $entry, $matches1);
|
||||
preg_match("#content=[\"\'](.*?)[\"\']#is", $entry, $matches2);
|
||||
//"
|
||||
preg_match("#property=[\"]og:(.*?)[\"]#is", $entry, $matches1);
|
||||
preg_match("#content=[\"](.*?)[\"]#is", $entry, $matches2);
|
||||
|
||||
$name = isset($matches1[1]) ? $matches1[1] : 1;
|
||||
$value = isset($matches2[1]) ? $matches2[1] : "";
|
||||
|
||||
//'
|
||||
preg_match("#property=[\']og:(.*?)[\']#is", $entry, $matches1);
|
||||
preg_match("#content=[\'](.*?)[\']#is", $entry, $matches2);
|
||||
|
||||
$name = isset($matches1[1]) ? $matches1[1] : $name;
|
||||
$value = isset($matches2[1]) ? $matches2[1] : $value;
|
||||
|
||||
$list[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user