- 新增 crawler.py: requests+bs4 readability风格清洗, 提取候选链接按文章相似度排序, 前5条抓全文存 articles.full_text, 详情页展示; example.com占位源走模拟, 真实源失败标记error不造假 - 大模型: 新增 llm_providers 表(预置 SiliconFlow/DeepSeek官方/Autodl/Local Qwen), 设置页增删改/测试/一键切换, 激活接口失败自动切换备用 - 数据源: 前端补编辑按钮+弹窗(后端 update 已支持), 列表显示URL与采集状态 - 数据库迁移: articles.full_text 列 + llm_providers 表
51 lines
2.1 KiB
HTML
51 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
{% set active = 'news' %}
|
|
{% block title %}{{ art.title }} - 新闻智能跟踪{% endblock %}
|
|
{% block content %}
|
|
<div class="page-head">
|
|
<h1 style="font-size:20px;">{{ art.title }}</h1>
|
|
<a class="btn" href="/news">← 返回列表</a>
|
|
</div>
|
|
|
|
<div class="detail-grid">
|
|
<section class="card">
|
|
<h3>📝 资讯内容</h3>
|
|
<div class="detail-content">{{ art.content or art.summary }}</div>
|
|
{% if art.full_text %}
|
|
<h3 style="margin-top:20px;">📄 页面可读全文(已入库)</h3>
|
|
<div class="full-text">{{ art.full_text }}</div>
|
|
{% endif %}
|
|
<div class="detail-meta">
|
|
<div>🔗 <a href="{{ art.url }}" target="_blank">{{ art.url }}</a></div>
|
|
<div>来源:{{ art.source_name }} · 作者:{{ art.author or '—' }}</div>
|
|
<div>发布时间:{{ art.published_at }} · 收录时间:{{ art.collected_at }}</div>
|
|
</div>
|
|
</section>
|
|
<aside>
|
|
<section class="card">
|
|
<h3>🤖 智能分析</h3>
|
|
<div class="score-big s{{ art.total_score }}">{{ art.total_score }}</div>
|
|
<div class="score-label">综合分</div>
|
|
<div class="kv">
|
|
<div><span>重要度(LLM)</span><b>{{ art.importance or '—' }}/10</b></div>
|
|
<div><span>兴趣相关度</span><b>{{ art.relevance }}%</b></div>
|
|
<div><span>是否重要</span><b>{{ '✅ 是' if art.is_important else '❌ 否' }}</b></div>
|
|
<div><span>深度分析</span><b>{{ '完成' if art.llm_status=='done' else ('分析中' if art.llm_status=='pending' else '未触发') }}</b></div>
|
|
<div><span>通知状态</span><b>{{ '✅ 已邮件' if art.notified else '未通知' }}</b></div>
|
|
</div>
|
|
{% if art.analysis %}
|
|
<div class="analysis-box">💡 {{ art.analysis }}</div>
|
|
{% endif %}
|
|
</section>
|
|
<section class="card">
|
|
<h3>🏷️ 涉及实体</h3>
|
|
<div class="chips">
|
|
{% for e in art.entities %}<span class="chip">{{ e }}</span>{% else %}<span class="muted">无</span>{% endfor %}
|
|
</div>
|
|
<h3 style="margin-top:16px;">🗂️ 分类</h3>
|
|
<span class="chip">{{ art.domain or '未分类' }}</span>
|
|
</section>
|
|
</aside>
|
|
</div>
|
|
{% endblock %}
|