parsing www.parliament.uk using php simple html dom parser

I needed to get a list of all websites for UK members of parliament and have it update reasonably frequently / ability to repeat. http://www.parliament.uk/mps-lords-and-offices/mps/ lists all the current members so a simple PHP script was written using http://simplehtmldom.sourceforge.net/ to parse the list of members, fetch each member profile and parse the name, website and twitter handles. This script in all it's hackyness may be found below (best run via php-cli to minimise timeout or memory issues) and example output at http://slog.carlheaton.co.uk/list-of-all-uk-members-of-parliament-name-website-twitter-handle/
<?php
ini_set('display_errors',0);
ini_set('error_reporting',"0");

include('simple_html_dom.php');  // from https://sourceforge.net/projects/simplehtmldom/files/
 
 
// Retrieve the DOM from a given URL
$html = file_get_html('http://www.parliament.uk/mps-lords-and-offices/mps/');

// Find all "A" tags and print their HREFs
foreach($html->find('a') as $e) {
  if (strpos($e->href,'biographies') !== false) {
    $_bios[] = $e->href;
  }
  unset($html);
}

//array_splice($_bios,10);

if(is_array($_bios)) {
  foreach($_bios as $_b) {
    echo "--- START: ".$_b." ---"."\n";
    $html = file_get_html($_b);
    // find name
    $ret = $html->find('title',0);
    if(!empty($ret->innertext)) {
      echo "\t"."Found title"."\n";
      $_mp[$_b]['name'] = trim(str_replace(' - UK Parliament','',$ret->innertext));
    }
    
    // find website
    $ret = $html->find('li[data-generic-id=website]',0);
    if(!empty($ret->innertext)) {
      echo "\t"."Found li[data-generic-id=website]"."\n";
      $_url_html = str_get_html($ret->innertext);
      if(!empty($_url_html)) {
        $_website = $_url_html->find('a',0);
        if(!empty($_website->href)) {
          echo "\t".$_website->href."\n";
          $_mp[$_b]['uri'] = $_website->href;
        }
      }
    } else {
      echo "\t"."NOT Found li[data-generic-id=website]"."\n";
    }
    
    // find twitter
    $ret = $html->find('li[data-generic-id=twitter]',0);
    if(!empty($ret->innertext)) {
      echo "\t"."Found li[data-generic-id=twitter]"."\n";
      $_url_html = str_get_html($ret->innertext);
      if(!empty($_url_html)) {
        $_website = $_url_html->find('a',0);
        if(!empty($_website->href)) {
          echo "\t".$_website->href."\n";
          $_mp[$_b]['twitter'] = $_website->href;
        }
      }
    } else {
      echo "\t"."NOT Found li[data-generic-id=twitter]"."\n";
    }
  }
}
echo "\n"."\n"."\n";
if(is_array($_mp)) {
  foreach ($_mp as $_l) {
    echo "'".$_l['name']."'".","."'".$_l['uri']."'".","."'".$_l['twitter']."'"."\n";
  }
}
?>