Adapted the regexp detecting entries to the new list format on fedipact.online

This commit is contained in:
pezcurrel 2024-03-23 07:32:24 +01:00
parent 76f64fa519
commit ec7939eb96

View file

@ -57,7 +57,8 @@ $cont=@file($opts['url'],FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
if (is_array($cont)) {
$doms=[];
foreach ($cont as $line)
if (preg_match('#<li>\s*🖤\s*[a-z0-9\.\-\_]+@([a-z0-9\.\-\_]+)\s*</li>#iu',$line,$matches)===1)
// if (preg_match('#<li>\s*🖤\s*[a-z0-9\.\-\_]+@([a-z0-9\.\-\_]+)\s*</li>#iu',$line,$matches)===1)
if (preg_match('#<li>\s*[a-z0-9\.\-\_]+@([a-z0-9\.\-\_]+)\s*</li>#iu',$line,$matches)===1)
if (!in_array($matches[1],$doms))
$doms[]=mb_strtolower($matches[1]);
$cdoms=count($doms);