#!/usr/bin/env bash
# Verifikasi setelah purge: apakah perubahan (FAQ + link internal) sudah tampil untuk pengunjung biasa?
set -u
UA="Mozilla/5.0"
URLS=(
"/9-contoh-konten-digital-marketing-rumah-sakit-yang-edukatif-dan-tetap-etis/"
"/berapa-lama-website-baru-muncul-di-google-ini-patokan-lama-pengerjaan-seo-yang-perlu-anda-tahu/"
"/7-langkah-belajar-digital-marketing-untuk-pemula-dari-nol-sampai-mahir/"
)
for u in "${URLS[@]}"; do
  curl -s -4 -D /tmp/h.txt --max-time 60 -A "$UA" "https://studiosoft.id$u" -o /tmp/pg.html
  cf=$(grep -i '^cf-cache-status' /tmp/h.txt | tr -d '\r' | awk '{print $2}')
  faq=$(grep -c '"FAQPage"' /tmp/pg.html || true)
  q=$(grep -c '<h3>' /tmp/pg.html || true)
  baca=$(grep -c 'Baca juga' /tmp/pg.html || true)
  printf "  cf=%-5s FAQPage=%s  pertanyaan=%s  Baca juga=%s | %s\n" "$cf" "$faq" "$q" "$baca" "$(echo "$u" | cut -c1-52)"
done
