Replace broken DDG search with AI thumbnail generation fallback
DuckDuckGo's HTML search endpoint now requires vqd session tokens, making server-side search-based URL resolution unreliable. Simplified the thumbnail pipeline: - OG scrape only for non-aggregator URLs (direct publisher pages) - AI image generation via OpenRouter for aggregator articles (Google News) - Added Image Model settings field in admin UI - Added thumbnail_local column for AI-generated images - Updated public/admin display to check thumbnail_local as fallback - Removed all DuckDuckGo search code (find_article_url_via_search, extract_ddg_url, resolve_article_for_scraping) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -134,7 +134,7 @@ class Peptide_News_Rest_API {
|
||||
|
||||
$articles = $wpdb->get_results( $wpdb->prepare(
|
||||
"SELECT id, source, source_url, title, excerpt, author, thumbnail_url,
|
||||
published_at, categories, tags
|
||||
thumbnail_local, published_at, categories, tags
|
||||
FROM {$table}
|
||||
WHERE is_active = 1
|
||||
ORDER BY published_at DESC
|
||||
|
||||
Reference in New Issue
Block a user