Add (rss post): domain
This commit is contained in:
@@ -53,6 +53,23 @@
|
||||
|
||||
Route::get('/crawlTask', [App\Http\Controllers\Tests\TestController::class, 'crawlTask']);
|
||||
|
||||
Route::get('/set_domain', function (Request $request) {
|
||||
|
||||
$last_record = RssPost::whereNull('post_domain')->orderBy('id', 'DESC')->first();
|
||||
|
||||
for ($i = 1; $i <= $last_record->id; $i++) {
|
||||
$rss_post = RssPost::find($i);
|
||||
|
||||
if (!is_null($rss_post))
|
||||
{
|
||||
$rss_post->post_domain = get_domain_from_url($rss_post->post_url);
|
||||
$rss_post->save();
|
||||
}
|
||||
}
|
||||
|
||||
return 'ok';
|
||||
});
|
||||
|
||||
Route::get('/set_keywords', function (Request $request) {
|
||||
|
||||
$last_record = RssPost::where('keyword_saved', false)->orderBy('id', 'DESC')->first();
|
||||
|
||||
Reference in New Issue
Block a user