add authors and date to nyt today
This commit is contained in:
parent
a6652c8ff6
commit
adce97f2b6
13
epub.php
13
epub.php
|
@ -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 . ' ';
|
||||
}
|
||||
$result .= '</p>';
|
||||
|
||||
$result .= '<p>' . $item->lastMajorModification . '</p>';
|
||||
$result .= '<p><b>' . $summary . '</b></p>';
|
||||
|
||||
$article = file_get_contents($item->url, false, $context);
|
||||
|
|
Loading…
Reference in New Issue