+ $entry->setContent($html);
+ $entry->setReadingTime(Utils::getReadingTime($html));
+
+ if (!empty($content['status'])) {
+ $entry->setHttpStatus($content['status']);
+ }
+
+ if (!empty($content['authors']) && is_array($content['authors'])) {
+ $entry->setPublishedBy($content['authors']);
+ }
+
+ if (!empty($content['all_headers']) && $this->storeArticleHeaders) {
+ $entry->setHeaders($content['all_headers']);
+ }
+
+ if (!empty($content['date'])) {
+ $this->updatePublishedAt($entry, $content['date']);
+ }
+
+ if (!empty($content['language'])) {
+ $this->updateLanguage($entry, $content['language']);
+ }
+
+ if (!empty($content['open_graph']['og_image'])) {
+ $this->updatePreviewPicture($entry, $content['open_graph']['og_image']);
+ }
+
+ // if content is an image, define it as a preview too
+ if (!empty($content['content_type']) && in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) {
+ $this->updatePreviewPicture($entry, $content['url']);
+ }
+
+ if (!empty($content['content_type'])) {
+ $entry->setMimetype($content['content_type']);
+ }
+
+ try {
+ $this->tagger->tag($entry);
+ } catch (\Exception $e) {
+ $this->logger->error('Error while trying to automatically tag an entry.', [
+ 'entry_url' => $content['url'],
+ 'error_msg' => $e->getMessage(),
+ ]);