{{ APP_NAME }} - ツイート詳細

{% include '_nav.html' %} {% if tweet %}
{{ tweet.author_name or '(投稿者不明)' }} @{{ tweet.author_username or '' }} {{ tweet.created_at or '' }}
{{ tweet.text or '(本文取得なし)' }}
{{ tweet.like_count or 0 }} {{ tweet.retweet_count or 0 }} 💬 親側 {{ tweet.reply_count or 0 }} X で開く ↗
{% else %}
ツイートが見つかりません(ID: {{ tweet_id }})
{% endif %} {% if replies %}

🤖 AI 判定(誹謗中傷・荒らし検出)

合計 {{ ai_stats.total }} 🔴 RED {{ ai_stats.red or 0 }} 🟡 YELLOW {{ ai_stats.yellow or 0 }} ⚪ OK {{ ai_stats.clean or 0 }} 未判定 {{ ai_stats.pending or 0 }}
{% set _ps = plan_status %} {% set _ai_bonus = _ps.ai_bonus_remaining or 0 %} {% set _ai_quota_total = _ps.ai_monthly_quota + _ai_bonus %} {% set _ai_pct = (100 * _ps.ai_used_this_month / _ai_quota_total) | round(1) if _ai_quota_total else 0 %}
📋 プラン: {{ _ps.plan_label }} AI判定: {{ '{:,}'.format(_ps.ai_used_this_month) }} / {{ '{:,}'.format(_ps.ai_monthly_quota) }}{% if _ai_bonus > 0 %} + 追加 {{ '{:,}'.format(_ai_bonus) }}{% endif %} ({{ _ai_pct }}%) 残り: {{ '{:,}'.format(_ps.ai_remaining) }}
⚙ プラン変更 →
{% if not _ps.ai_key_openai_set %}
⚠ サーバーに AI APIキー が未登録です。⚙ 設定から AI APIキーを登録してください。
{% endif %}
※ AI判定はサーバー側で実行されます。プランの月次上限まで利用可能。
{% endif %}
取得済みリプライ: {{ replies|length }} 📊 Excel出力
{% if replies %}

📸 キャプチャ(証拠保全)

X の実画面をスクリーンショットして PNG で保存します。Playwright が必要です。
保存先: <アプリ\<投稿者>\captures\{{ tweet_id }}
※ 初回のみ pip install playwrightplaywright install chromium が必要です。Xのログイン誘導で一部取れない場合があります。
{% endif %}
{% if replies %} {% for r in replies %} {% set _card = (r.ai_card or '')|lower %}
{% if _card == 'red' %}🔴 RED {{ r.ai_score or 0 }} {% elif _card == 'yellow' %}🟡 YELLOW {{ r.ai_score or 0 }} {% elif _card == 'clean' %}⚪ OK {{ r.ai_score or 0 }} {% endif %} {{ r.author_name or '' }} @{{ r.author_username or '' }} {{ r.created_at or '' }}
{{ r.text or '' }}
{% if r.ai_reason %}
💡 {{ r.ai_reason }}{% if r.ai_model %} ({{ r.ai_model }}){% endif %}
{% endif %}
{% endfor %} {% else %}
リプライがまだ取得されていません。
{% endif %}