{{ APP_NAME }} - 投稿詳細

{% include '_nav.html' %} {% if media %}
{{ media.owner_name or '(投稿者不明)' }} @{{ media.owner_username or '' }} {{ media.created_at or '' }}
{{ media.caption or '(キャプションなし)' }}
{{ media.like_count or 0 }} 💬 {{ media.comment_count or 0 }} {% if media.play_count %}{{ media.play_count }}{% endif %} {% if media.shortcode %} Instagram で開く ↗ {% endif %}
{% else %}
投稿が見つかりません(ID: {{ media_id }})
{% endif %} {% if comments %}

🤖 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判定機能は現在ご利用いただけません。
{% endif %}
※ AI判定はサーバー側で実行されます。プランの月次上限まで利用可能。
{% endif %}
取得済みコメント: {{ comments|length }} 📊 Excel出力
{% if comments %}

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

Instagram の実画面をスクリーンショットして PNG で保存します。Playwright が必要です。
※ Instagram はログイン誘導が強く、未ログインだと取得失敗するコメントが多いです。 保存先: <アプリ\<投稿者>\captures\{{ media_id }}
※ 初回のみ pip install playwrightplaywright install chromium が必要です。
{% endif %}
{% if comments %} {% for c in comments %} {% set _card = (c.ai_card or '')|lower %}
{% if _card == 'red' %}🔴 RED {{ c.ai_score or 0 }} {% elif _card == 'yellow' %}🟡 YELLOW {{ c.ai_score or 0 }} {% elif _card == 'clean' %}⚪ OK {{ c.ai_score or 0 }} {% endif %} {{ c.author_name or '' }} @{{ c.author_username or '' }} {{ c.created_at or '' }}
{{ c.text or '' }}
{% if c.ai_reason %}
💡 {{ c.ai_reason }}{% if c.ai_model %} ({{ c.ai_model }}){% endif %}
{% endif %}
{% endfor %} {% else %}
コメントがまだ取得されていません。
{% endif %}