Removed gender and marital status for better privacy

This commit is contained in:
hauke 2015-12-24 08:42:48 +01:00
commit cd976b8dcc
14 changed files with 9 additions and 119 deletions

View file

@ -103,7 +103,7 @@ function scrape_dfrn($url, $max_nodes=3500) {
$nodes_left = max(intval($max_nodes), $minNodes);
$items = $dom->getElementsByTagName('*');
$targets = array('fn', 'pdesc', 'photo', 'key', 'locality', 'region', 'postal-code', 'country-name', 'gender', 'marital');
$targets = array('fn', 'pdesc', 'photo', 'key', 'locality', 'region', 'postal-code', 'country-name');
$targets_left = count($targets);
foreach($items as $item) {
if(attribute_contains($item->getAttribute('class'), 'vcard')) {
@ -141,16 +141,8 @@ function scrape_dfrn($url, $max_nodes=3500) {
$ret['country-name'] = $x->textContent;
$targets_left = pop_scrape_target($targets, 'country-name');
}
if(attribute_contains($x->getAttribute('class'),'x-gender')){
$ret['gender'] = $x->textContent;
$targets_left = pop_scrape_target($targets, 'gender');
}
}
}
if(attribute_contains($item->getAttribute('class'),'marital-text')){
$ret['marital'] = $item->textContent;
$targets_left = pop_scrape_target($targets, 'marital');
}
$nodes_left--;
if($nodes_left <= 0 || $targets_left <= 0) break;
}