update
This commit is contained in:
@ -55,11 +55,11 @@ class Toutiao extends BaseSpider
|
||||
|
||||
$query = AppNews::query()->select(['id', 'created_at'])->where('platform', $platform)->where('is_delete', 0)->get()->toArray();
|
||||
foreach ($query as $item) {
|
||||
// $date = date('Y-m-d', $item['created_at']);
|
||||
$date = date('Y-m-d', $item['created_at']);
|
||||
$sitemapArray[] = <<<EOF
|
||||
<url>
|
||||
<loc>https://$domain/news/{$item['id']}</loc>
|
||||
<lastmod>{$item['created_at']}</lastmod>
|
||||
<lastmod>{$date}</lastmod>
|
||||
</url>
|
||||
EOF;
|
||||
}
|
||||
|
Reference in New Issue
Block a user