add authors and date to nyt today

This commit is contained in:
quenousimporte 2024-06-05 12:51:50 +02:00
parent a6652c8ff6
commit adce97f2b6
1 changed files with 10 additions and 3 deletions

View File

@ -332,10 +332,17 @@
$result = '<h1>' . $title . '</h1>';
// todo
//$result .= '<p>' . $author . '</p>';
//$result .= '<p>' . $item->pubDate . '</p>';
// authors
$result .= '<p>';
$creators = ($data->initialState->{ $item->bylines[0]->id })->creators;
foreach ($creators as $creator)
{
$author = $data->initialState->{ $creator->id };
$result .= $author->displayName . '&nbsp;';
}
$result .= '</p>';
$result .= '<p>' . $item->lastMajorModification . '</p>';
$result .= '<p><b>' . $summary . '</b></p>';
$article = file_get_contents($item->url, false, $context);