From adce97f2b68837542789e2da4a3b4c279e382ddf Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 5 Jun 2024 12:51:50 +0200 Subject: [PATCH] add authors and date to nyt today --- epub.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/epub.php b/epub.php index 69fafaa..c652d7c 100644 --- a/epub.php +++ b/epub.php @@ -332,10 +332,17 @@ $result = '

' . $title . '

'; - // todo - //$result .= '

' . $author . '

'; - //$result .= '

' . $item->pubDate . '

'; + // authors + $result .= '

'; + $creators = ($data->initialState->{ $item->bylines[0]->id })->creators; + foreach ($creators as $creator) + { + $author = $data->initialState->{ $creator->id }; + $result .= $author->displayName . ' '; + } + $result .= '

'; + $result .= '

' . $item->lastMajorModification . '

'; $result .= '

' . $summary . '

'; $article = file_get_contents($item->url, false, $context);