{% extends "base.html" %} {% block title %}站点登录 — News Harvester{% endblock %} {% block extra_head %} {% if test_state and test_state.values() | selectattr('running') | list %} {% endif %} {% endblock %} {% block content %}

站点登录

为付费/需登录的数据源维护凭据。保存后以 600 权限落盘(etc/news-harvester/logins/),密码不再回显; 每次采集前自动预检,未登录会自动登录。配方(页面选择器)在技能仓 logins/ 下维护。

{% with messages = get_flashed_messages() %} {% if messages %}{% for m in messages %}
{{ m }}
{% endfor %}{% endif %} {% endwith %}
{% for r in rows %} {% endfor %}
数据源登录账号站点凭据自动登录配方上次测试操作
{{ r.source }} {{ r.user or '—' }} {{ r.url or '—' }} {% if r.configured %}已配置 {% else %}未配置{% endif %} {% if r.has_recipe %}支持 {% else %}无配方(点右侧按钮自动生成){% endif %} {% set st = test_state.get(r.source) %} {% if st and st.running %} 测试中…(启动于 {{ st.start }}) {% elif st and st.done %} {% if '已登录' in st.output or '登录成功' in st.output %} 通过 {% else %} 失败 {% endif %}
输出
{{ st.output }}
{% else %} — {% endif %}
{% if r.has_recipe %}
{% elif r.configured %}
{% endif %}

{{ '编辑凭据' if edit_hint else '添加 / 更新凭据' }}

{% endblock %}