Merge remote-tracking branch 'origin/main' into fix/saju-climate

This commit is contained in:
minaChoi committed 2026-10-29 13:15:51 +09:00
commit b8afbe4e0a
16 files changed
+385 -25

No files matched your search

+20 -2
View File
@@ -30,15 +30,33 @@ $ARGUMENTS 가 있으면 위 목록에 더한다.
- `docs/검색_노출.md` 5장(노출 기록)의 '기록' 표 맨 아래에 오늘 날짜 행을 더한다. 형식은 그 표를 따른다.
- 어제 행과 비교해 바뀐 것(새로 잡힘·빠짐·순위 변화·색인 주소 수)을 뽑는다.
## 5. 다음 할 일 제안
## 5. 원인 분석 (빠짐·순위 하락이 하나라도 있으면 반드시)
숫자만 보고하고 끝내지 않는다. 왜 그렇게 됐는지 아래를 직접 확인하고, 확인한 것·배제한 것·남은 가설을 나눠 적는다.
- 페이지 상태: 빠진 주소를 Googlebot·Yeti UA 로 curl 해 상태 코드·title·canonical·robots meta, robots.txt 를 본다.
- 렌더 뒤 화면: 구글은 JS 실행 뒤 HTML 로 색인한다. 헤드리스 Chrome(`--headless=new --virtual-time-budget=20000 --dump-dom`, Googlebot UA)으로 렌더해 h1·검색어 문구·자주 묻는 질문이 남는지 센다.
- 색인 여부: 구글·네이버 `site:weather.o2o.kr <지역>` 에 그 주소가 있는지. 없으면 색인 문제, 있으면 순위 문제.
- 봇 방문: `ssh King_admin 'docker logs --since 72h o2o-weather-frontend-1'` 에서 Googlebot·Yeti 가 그 주소를 받았는지·상태 코드.
- 바뀐 것: 직전 측정 이후 `git log --since=<직전 측정일> -- frontend backend` 로 그 페이지 화면·제목·사이트맵에 닿은 커밋을 찾는다. 배포 시각과 측정 시각의 앞뒤를 맞춘다.
- 사이트 안 경쟁: `site:` 결과에 같은 검색어를 두고 겹치는 다른 주소(예: /shorts/*)가 있는지.
- 측정 잡음: 직전 순위가 구글 2p·네이버 10위 밖처럼 경계였는지, 직전 측정이 실패(`?`)였는지.
## 6. 대안 제시
- 원인마다 고칠 방법 1~3개와 추천 하나, 각 방법의 근거(공식 문서 또는 위에서 확인한 사실)와 예상 효과·단점을 쓴다.
- 고칠지는 AskUserQuestion 으로 묻고, 고르면 그대로 고친다.
## 7. 다음 할 일 제안
- 근거는 공식 문서만 쓴다: `docs/검색_노출.md` 4장(구글 검색 정책), 구글 Search Central, 네이버 서치어드바이저 가이드. 문서에 없는 건 "문서에 없음"이라 쓰고, 판단·추정은 따로 표시한다.
- 같은 페이지를 매일 수집 요청하지 않는다(네이버: 반영에 1일~몇 주, 매일 반복 불필요).
- 바꾼 뒤 결과는 몇 주 단위로 본다(구글: 변경 반영에 몇 시간~몇 달). 하루 변화로 원인을 단정하지 않는다.
- 코드·문구 수정이 필요하면 고치지 말고 제안만 하고, 결정이 필요한 건 `TODO.md`에 적는다.
## 6. 보고 (채팅, 짧게)
## 8. 보고 (채팅, 짧게)
- 바뀐 것 3줄 이내
- 검색어별 구글/네이버 순서 (없음·차단 포함)
- 빠짐·하락의 원인 분석(확인한 것·배제한 것·가설)과 대안·추천
- 다음 할 일 1~3개 (근거 출처 포함)
+2
View File
@@ -3,6 +3,7 @@ import { AdminLayout } from './pages/AdminLayout'
import { CardsPage } from './pages/CardsPage'
import { HistoryPage } from './pages/HistoryPage'
import { RenderPage } from './pages/RenderPage'
import { UsersPage } from './pages/UsersPage'
export default function App() {
return (
@@ -13,6 +14,7 @@ export default function App() {
<Route element={<AdminLayout />}>
<Route index element={<CardsPage />} />
<Route path="history" element={<HistoryPage />} />
<Route path="users" element={<UsersPage />} />
<Route path="*" element={<CardsPage />} />
</Route>
</Routes>
+1
View File
@@ -3,6 +3,7 @@ import { NavLink, Outlet } from 'react-router'
const NAV = [
{ to: '/', label: '인스타 카드', end: true },
{ to: '/history', label: '만든 카드', end: false },
{ to: '/users', label: '가입자', end: false },
]
export function AdminLayout() {
+120
View File
@@ -0,0 +1,120 @@
import { useQuery } from '@tanstack/react-query'
import { useSearchParams } from 'react-router'
import { useTargets } from '../api/targets'
import type { Target } from '../api/targets'
type Provider = 1 | 2 | 3
type User = { nickname: string; provider: Provider; points: number; level: number; level_name: string; suspended: boolean; created_at: string; last_active?: string }
type Res = { total: number; counts: Record<string, number>; items: User[] }
const PROVIDER: Record<Provider, { label: string; tone: string }> = {
1: { label: '웹 일반', tone: 'bg-rail text-ink-soft' },
2: { label: '웹 구글', tone: 'bg-warn-soft text-warn' },
3: { label: '토스', tone: 'bg-rust-soft text-rust' },
}
const DAY = ['일', '월', '화', '수', '목', '금', '토']
function day(iso: string) {
const d = new Date(iso)
return `${d.getFullYear() % 100}.${d.getMonth() + 1}.${d.getDate()} ${DAY[d.getDay()]}`
}
/** 가입자 목록: 올릴 곳(로컬·킹서버)마다 가입 경로·레벨·모은 각을 본다 */
export function UsersPage() {
const { data: targets = [] } = useTargets()
const [params, setParams] = useSearchParams()
const target = targets.find((t) => t.id === params.get('target')) ?? targets[0]
const provider = (Number(params.get('provider')) || 0) as 0 | Provider
const set = (next: Record<string, string>) => setParams((p) => {
for (const [k, v] of Object.entries(next)) {
if (v) p.set(k, v)
else p.delete(k)
}
return p
}, { replace: true })
return (
<div className="mx-auto flex max-w-[1440px] flex-col gap-5 px-4 py-5 sm:px-6">
<header className="flex flex-wrap items-center justify-between gap-x-6 gap-y-3">
<div className="flex min-w-0 flex-col gap-0.5">
<h1 className="text-[20px] font-bold tracking-[-0.02em]">가입자</h1>
<p className="text-[13px] text-muted">웹(일반·구글)과 토스로 가입한 사람. 마지막 활동은 각을 마지막으로 받은 날이에요.</p>
</div>
{targets.length > 1 && (
<div role="tablist" aria-label="서버" className="flex gap-1 rounded-xl border border-line bg-panel p-1">
{targets.map((t) => (
<button key={t.id} role="tab" aria-selected={t.id === target?.id} onClick={() => set({ target: t.id })} className={`rounded-lg px-4 py-2 text-[14px] font-bold transition-colors duration-150 ${t.id === target?.id ? 'bg-ink text-white' : 'text-ink-soft hover:bg-rail'}`}>
{t.label}
</button>
))}
</div>
)}
</header>
{target ? <UserList target={target} provider={provider} onProvider={(p) => set({ provider: p ? String(p) : '' })} /> : <p className="rounded-xl border border-bad/30 bg-bad-soft px-5 py-4 text-[14px] text-bad">서버가 없어요. 관리자 서버에 ADMIN_API_KEY(로컬)·KING_ADMIN_API_KEY(킹서버)를 주고 다시 켜 주세요.</p>}
</div>
)
}
function UserList({ target, provider, onProvider }: { target: Target; provider: 0 | Provider; onProvider: (p: 0 | Provider) => void }) {
const { data, error, isLoading } = useQuery({
queryKey: ['users', target.id],
queryFn: async () => {
const r = await fetch(`/api/users?target=${target.id}`)
const body = await r.json()
if (!r.ok || body.result?.success === false) throw new Error(body.error ?? body.result?.desc ?? `HTTP ${r.status}`)
return body as Res
},
})
const items = data?.items ?? []
const shown = provider ? items.filter((u) => u.provider === provider) : items
return (
<section className="flex flex-col gap-4">
<div role="radiogroup" aria-label="가입 경로" className="flex flex-wrap gap-2">
{([0, 1, 2, 3] as const).map((p) => (
<button key={p} role="radio" aria-checked={provider === p} onClick={() => onProvider(p)} className={`rounded-full border px-3 py-1 text-[12px] font-semibold transition-colors duration-150 ${provider === p ? 'border-ink bg-ink text-white' : 'border-line bg-panel text-ink hover:border-ink-soft'}`}>
{p === 0 ? '전체' : PROVIDER[p].label} <span className={provider === p ? 'text-white/70' : 'text-muted'}>{p === 0 ? (data?.total ?? 0) : (data?.counts[p] ?? 0)}</span>
</button>
))}
</div>
{error && (
<div role="alert" className="rounded-xl border border-bad/30 bg-bad-soft px-5 py-4 text-[14px] text-bad">
{target.label} 가입자를 받지 못했어요: {error instanceof Error ? error.message : String(error)}
</div>
)}
{isLoading && <div className="h-64 animate-pulse rounded-2xl bg-rail" aria-busy="true" />}
{data && shown.length === 0 && <p className="rounded-2xl border border-dashed border-line bg-panel px-5 py-10 text-center text-[14px] text-muted">가입자가 없어요.</p>}
{shown.length > 0 && (
<div className="overflow-x-auto rounded-2xl border border-line bg-panel">
<table className="w-full min-w-[720px] border-collapse text-[14px]">
<thead>
<tr className="border-b border-line text-left text-[12px] text-muted">
<th className="px-4 py-2.5 font-semibold">닉네임</th>
<th className="px-4 py-2.5 font-semibold">가입 경로</th>
<th className="px-4 py-2.5 font-semibold">레벨</th>
<th className="px-4 py-2.5 text-right font-semibold">각</th>
<th className="px-4 py-2.5 font-semibold">가입일</th>
<th className="px-4 py-2.5 font-semibold">마지막 활동</th>
</tr>
</thead>
<tbody>
{shown.map((u, i) => (
<tr key={`${u.created_at}-${i}`} className="border-b border-line/60 last:border-0">
<td className="px-4 py-2.5 font-semibold">
{u.nickname}
{u.suspended && <span className="ml-2 rounded-md bg-bad-soft px-1.5 py-0.5 text-[11px] font-bold text-bad">정지</span>}
</td>
<td className="px-4 py-2.5"><span className={`rounded-md px-1.5 py-0.5 text-[12px] font-bold ${PROVIDER[u.provider].tone}`}>{PROVIDER[u.provider].label}</span></td>
<td className="px-4 py-2.5">Lv.{u.level} <span className="text-ink-soft">{u.level_name}</span></td>
<td className="px-4 py-2.5 text-right tabular-nums">{u.points.toLocaleString()}</td>
<td className="px-4 py-2.5 tabular-nums text-ink-soft">{day(u.created_at)}</td>
<td className="px-4 py-2.5 tabular-nums text-ink-soft">{u.last_active ? day(u.last_active) : '—'}</td>
</tr>
))}
</tbody>
</table>
</div>
)}
</section>
)
}
+13
View File
@@ -155,6 +155,19 @@ function postApi(): Plugin {
res.end(JSON.stringify({ error: e instanceof Error ? e.message : String(e) }))
}
})
// 가입자: GET /api/users → GET /v1/admin/users
server.middlewares.use('/api/users', async (req, res) => {
res.setHeader('Content-Type', 'application/json; charset=utf-8')
try {
if (req.method !== 'GET') throw new Error('GET /api/users')
const t = targetOf(req)
return await relay(res, await fetch(`${t.api}/v1/admin/users?limit=2000`, { headers: headers(t) }))
} catch (e) {
server.config.logger.error(`[users-api] ${e instanceof Error ? e.message : String(e)}`)
res.statusCode = 500
res.end(JSON.stringify({ error: e instanceof Error ? e.message : String(e) }))
}
})
server.middlewares.use('/api/post', async (req, res) => {
res.setHeader('Content-Type', 'application/json; charset=utf-8')
try {
+12 -2
View File
@@ -3,13 +3,23 @@ from collections import Counter
from datetime import datetime, timezone
from typing import Optional
from sqlalchemy import delete, select, update
from sqlalchemy import delete, func, select, update
from sqlalchemy.ext.asyncio import AsyncSession
from common.database.model.models import Comment, CommentLike, CommentReport, Post, PostLike, PostSave, User, UserBlock
from common.database.model.models import Comment, CommentLike, CommentReport, PointLog, Post, PostLike, PostSave, User, UserBlock
class UserCRUD:
async def admin_list(self, s: AsyncSession, limit: int) -> list[tuple[User, Optional[datetime]]]:
"""가입자 최근 순, 각을 마지막으로 받은 날과 함께 (관리자 목록)"""
last = select(PointLog.user_id, func.max(PointLog.day).label("last")).group_by(PointLog.user_id).subquery()
rows = await s.execute(select(User, last.c.last).outerjoin(last, last.c.user_id == User.user_id).where(User.deleted.is_(False)).order_by(User.created_at.desc()).limit(limit))
return [(u, d) for u, d in rows.all()]
async def provider_counts(self, s: AsyncSession) -> dict[int, int]:
rows = await s.execute(select(User.provider, func.count()).where(User.deleted.is_(False)).group_by(User.provider))
return {p: n for p, n in rows.all()}
async def by_login_id(self, s: AsyncSession, login_id: str) -> Optional[User]:
return await s.scalar(select(User).where(User.login_id == login_id, User.deleted.is_(False)))
+2
View File
@@ -7,6 +7,7 @@ from fastapi.middleware.cors import CORSMiddleware
from common.cache.redis_client import REDIS
from common.database.db_session_manager import DB_SESSION_MNG
from common.models.gmodel import Res_WebPacketProtocol
from router.v1.admin.users import router as admin_users_router
from router.v1.auth.account import router as auth_router
from router.v1.card.card import router as card_router
from router.v1.reel.reel import router as reel_router
@@ -61,6 +62,7 @@ app.include_router(seo_router)
app.include_router(card_router)
app.include_router(reel_router)
app.include_router(shorts_router)
app.include_router(admin_users_router)
class Res_Health(Res_WebPacketProtocol):
View File
Whitespace-only changes.
+24
View File
@@ -0,0 +1,24 @@
from datetime import date, datetime
from typing import Optional
from pydantic import Field
from common.enums import AuthProvider
from common.models.gmodel import Res_WebPacketProtocol, WebPacketProtocol
class AdminUser(WebPacketProtocol):
nickname: str
provider: AuthProvider
points: int = Field(description="모은 각 총량")
level: int
level_name: str
suspended: bool
created_at: datetime
last_active: Optional[date] = Field(None, description="각을 마지막으로 받은 날")
class Res_AdminUsers(Res_WebPacketProtocol):
total: int = 0
counts: dict[int, int] = Field({}, description="가입 경로(AuthProvider)별 인원")
items: list[AdminUser] = []
+31
View File
@@ -0,0 +1,31 @@
from fastapi import APIRouter, Depends, Query
from common.auth import require_admin
from common.database.db_session_manager import DB_SESSION_MNG
from common.enums import AuthProvider, ErrorType
from common.models.errors import error_info
from common.utils.kma_time import KST
from crud.user_crud import UserCRUD
from router.v1.admin.protocol import AdminUser, Res_AdminUsers
from services.level_service import LEVELS, level_of
router = APIRouter(prefix="/v1/admin", tags=["admin"])
_crud = UserCRUD()
@router.get("/users", response_model=Res_AdminUsers, response_model_exclude_none=True, summary="가입자 목록 (관리자). 가입 경로·레벨·각. 아이디·생년월일은 안 준다", dependencies=[Depends(require_admin)])
async def list_users(limit: int = Query(500, ge=1, le=2000)) -> Res_AdminUsers:
async def run(s):
return await _crud.admin_list(s, limit), await _crud.provider_counts(s)
err, res = await DB_SESSION_MNG.execute_lambda(run)
if err is not ErrorType.SUCCESS:
return Res_AdminUsers(result=error_info(err))
rows, counts = res
items = []
for u, last in rows:
lv = level_of(u.points)
items.append(AdminUser(nickname=u.nickname, provider=AuthProvider(u.provider), points=u.points, level=lv, level_name=LEVELS[lv - 1][1],
suspended=u.status != 1, created_at=u.created_at.astimezone(KST), last_active=last))
return Res_AdminUsers(total=sum(counts.values()), counts=counts, items=items)
+36
View File
@@ -0,0 +1,36 @@
import pytest
from httpx import ASGITransport, AsyncClient
from config.settings import settings
from router.router import app
KEY = "test-admin-key"
pytestmark = pytest.mark.usefixtures("no_bot_comments")
def client():
return AsyncClient(transport=ASGITransport(app=app), base_url="http://test")
@pytest.mark.anyio
async def test_admin_users_needs_key(monkeypatch):
monkeypatch.setattr(settings, "admin_api_key", KEY)
async with client() as c:
assert (await c.get("/v1/admin/users")).status_code == 401
assert (await c.get("/v1/admin/users", headers={"X-Admin-Key": "wrong"})).status_code == 401
@pytest.mark.anyio
async def test_admin_users_lists_level_and_points(offline, monkeypatch):
monkeypatch.setattr(settings, "admin_api_key", KEY)
async with client() as c:
body = (await c.post("/v1/auth/signup", json={"login_id": "adm_user1", "password": "password1", "nickname": "가짜닉"})).json()
h = {"Authorization": f"Bearer {body['access_token']}"}
await c.post("/v1/auth/terms", headers=h)
await c.post("/v1/level/attend", headers=h)
res = (await c.get("/v1/admin/users", headers={"X-Admin-Key": KEY})).json()
me = next(u for u in res["items"] if u["nickname"] == "가짜닉")
assert me["provider"] == 1 and me["points"] == 10 and me["level"] == 1 and me["level_name"] == "이슬" and me["last_active"]
assert "login_id" not in me and "birth_date" not in me
assert res["counts"]["1"] >= 1 and res["total"] >= 1
@@ -0,0 +1,79 @@
오늘 날씨 1371808B - 1371988B -
내일 날씨 1286270B - 1286446B -
모레 날씨 1150349B - 1150529B -
이번주 날씨 1312186B - 1312373B -
주말 날씨 1310861B - 1311044B -
날씨 1396630B - 1396810B -
서울 오늘 날씨 1281266B - 1281444B -
서울 내일 날씨 1283717B - 1283899B -
서울 날씨 1049772B - 1049958B -
부산 오늘 날씨 1245056B - 1245233B -
부산 내일 날씨 1266693B - 1266868B -
부산 날씨 1301723B - 1301909B -
인천 오늘 날씨 1269661B - 1269847B -
인천 내일 날씨 1262166B - 1262354B -
인천 날씨 1349694B - 1349880B -
대구 오늘 날씨 1226277B - 1226460B -
대구 내일 날씨 1242598B - 1242785B -
대구 날씨 1308738B - 1308920B -
대전 오늘 날씨 1237245B - 1237429B -
대전 내일 날씨 1274773B - 1274955B -
대전 날씨 1336096B - 1336282B -
광주 오늘 날씨 1309522B - 1309708B -
광주 내일 날씨 1252771B - 1252951B -
광주 날씨 1327984B - 1328170B -
울산 오늘 날씨 1262830B - 1263012B -
울산 내일 날씨 1231480B - 1231662B -
울산 날씨 1371449B - 1371627B -
세종 오늘 날씨 1245527B - 1245713B -
세종 내일 날씨 1313319B - 1313496B -
세종 날씨 1248849B - 1249029B -
수원 오늘 날씨 1265808B - 1265986B -
수원 내일 날씨 1243239B - 1243419B -
수원 날씨 1325589B - 1325769B -
성남 오늘 날씨 1253371B - 1253553B -
성남 내일 날씨 1177900B - 1178081B -
성남 날씨 1214952B - 1215137B -
고양 오늘 날씨 1270339B - 1270523B -
고양 내일 날씨 1249671B - 1249855B -
고양 날씨 1209803B - 1209983B -
용인 오늘 날씨 1243446B - 1243628B -
용인 내일 날씨 1203581B - 1203759B -
용인 날씨 1280794B - 1280976B -
창원 오늘 날씨 1209334B - 1209516B -
창원 내일 날씨 1221943B - 1222123B -
창원 날씨 1301874B - 1302054B -
청주 오늘 날씨 1239951B - 1240137B -
청주 내일 날씨 1253815B - 1253993B -
청주 날씨 1340520B - 1340700B -
천안 오늘 날씨 1221359B - 1221541B -
천안 내일 날씨 1218803B - 1218985B -
천안 날씨 1344315B - 1344497B -
전주 오늘 날씨 1806743B - 1806927B -
전주 내일 날씨 1758758B - 1758942B -
전주 날씨 1290043B - 1290227B -
군산 오늘 날씨 1255867B - 1256049B -
군산 내일 날씨 1205287B - 1205467B -
군산 날씨 1237974B - 1238154B -
포항 오늘 날씨 1205314B - 1205500B -
포항 내일 날씨 1256673B - 1256859B -
포항 날씨 1338947B - 1339126B -
제주 오늘 날씨 1284726B - 1284909B -
제주 내일 날씨 1224271B - 1224455B -
제주 날씨 1410935B - 1411375B -
김해 오늘 날씨 1202848B - 1203030B -
김해 내일 날씨 1237655B - 1237839B -
김해 날씨 1255061B - 1255242B -
화성 오늘 날씨 1320876B - 1321063B -
화성 내일 날씨 1158506B - 1158690B -
화성 날씨 1292521B - 1292705B -
부천 오늘 날씨 1208702B - 1208884B -
부천 내일 날씨 1207789B - 1207969B -
부천 날씨 1057895B - 1058083B -
안산 오늘 날씨 1257275B - 1257455B -
안산 내일 날씨 1517067B - 1517249B -
안산 날씨 1248040B - 1248222B -
남양주 오늘 날씨 1314986B - 1315174B -
남양주 내일 날씨 1246129B - 1246313B -
남양주 날씨 1309900B - 1310086B -
날씨각 587456B 1 https://weather.o2o.kr/ 587644B 1 https://weather.o2o.kr/
1 오늘 날씨 1371808B - 1371988B -
2 내일 날씨 1286270B - 1286446B -
3 모레 날씨 1150349B - 1150529B -
4 이번주 날씨 1312186B - 1312373B -
5 주말 날씨 1310861B - 1311044B -
6 날씨 1396630B - 1396810B -
7 서울 오늘 날씨 1281266B - 1281444B -
8 서울 내일 날씨 1283717B - 1283899B -
9 서울 날씨 1049772B - 1049958B -
10 부산 오늘 날씨 1245056B - 1245233B -
11 부산 내일 날씨 1266693B - 1266868B -
12 부산 날씨 1301723B - 1301909B -
13 인천 오늘 날씨 1269661B - 1269847B -
14 인천 내일 날씨 1262166B - 1262354B -
15 인천 날씨 1349694B - 1349880B -
16 대구 오늘 날씨 1226277B - 1226460B -
17 대구 내일 날씨 1242598B - 1242785B -
18 대구 날씨 1308738B - 1308920B -
19 대전 오늘 날씨 1237245B - 1237429B -
20 대전 내일 날씨 1274773B - 1274955B -
21 대전 날씨 1336096B - 1336282B -
22 광주 오늘 날씨 1309522B - 1309708B -
23 광주 내일 날씨 1252771B - 1252951B -
24 광주 날씨 1327984B - 1328170B -
25 울산 오늘 날씨 1262830B - 1263012B -
26 울산 내일 날씨 1231480B - 1231662B -
27 울산 날씨 1371449B - 1371627B -
28 세종 오늘 날씨 1245527B - 1245713B -
29 세종 내일 날씨 1313319B - 1313496B -
30 세종 날씨 1248849B - 1249029B -
31 수원 오늘 날씨 1265808B - 1265986B -
32 수원 내일 날씨 1243239B - 1243419B -
33 수원 날씨 1325589B - 1325769B -
34 성남 오늘 날씨 1253371B - 1253553B -
35 성남 내일 날씨 1177900B - 1178081B -
36 성남 날씨 1214952B - 1215137B -
37 고양 오늘 날씨 1270339B - 1270523B -
38 고양 내일 날씨 1249671B - 1249855B -
39 고양 날씨 1209803B - 1209983B -
40 용인 오늘 날씨 1243446B - 1243628B -
41 용인 내일 날씨 1203581B - 1203759B -
42 용인 날씨 1280794B - 1280976B -
43 창원 오늘 날씨 1209334B - 1209516B -
44 창원 내일 날씨 1221943B - 1222123B -
45 창원 날씨 1301874B - 1302054B -
46 청주 오늘 날씨 1239951B - 1240137B -
47 청주 내일 날씨 1253815B - 1253993B -
48 청주 날씨 1340520B - 1340700B -
49 천안 오늘 날씨 1221359B - 1221541B -
50 천안 내일 날씨 1218803B - 1218985B -
51 천안 날씨 1344315B - 1344497B -
52 전주 오늘 날씨 1806743B - 1806927B -
53 전주 내일 날씨 1758758B - 1758942B -
54 전주 날씨 1290043B - 1290227B -
55 군산 오늘 날씨 1255867B - 1256049B -
56 군산 내일 날씨 1205287B - 1205467B -
57 군산 날씨 1237974B - 1238154B -
58 포항 오늘 날씨 1205314B - 1205500B -
59 포항 내일 날씨 1256673B - 1256859B -
60 포항 날씨 1338947B - 1339126B -
61 제주 오늘 날씨 1284726B - 1284909B -
62 제주 내일 날씨 1224271B - 1224455B -
63 제주 날씨 1410935B - 1411375B -
64 김해 오늘 날씨 1202848B - 1203030B -
65 김해 내일 날씨 1237655B - 1237839B -
66 김해 날씨 1255061B - 1255242B -
67 화성 오늘 날씨 1320876B - 1321063B -
68 화성 내일 날씨 1158506B - 1158690B -
69 화성 날씨 1292521B - 1292705B -
70 부천 오늘 날씨 1208702B - 1208884B -
71 부천 내일 날씨 1207789B - 1207969B -
72 부천 날씨 1057895B - 1058083B -
73 안산 오늘 날씨 1257275B - 1257455B -
74 안산 내일 날씨 1517067B - 1517249B -
75 안산 날씨 1248040B - 1248222B -
76 남양주 오늘 날씨 1314986B - 1315174B -
77 남양주 내일 날씨 1246129B - 1246313B -
78 남양주 날씨 1309900B - 1310086B -
79 날씨각 587456B 1 https://weather.o2o.kr/ 587644B 1 https://weather.o2o.kr/
+19 -13
View File
@@ -402,7 +402,13 @@
순위 = 결과에서 weather.o2o.kr이 몇 번째 사이트인지(같은 사이트는 한 번만 셈). `-` 첫 페이지에 없음. 적힌 검색어만 나온 것, 나머지는 `-`.
구글은 첫 페이지(사이트 6~9개)만 본다. 로그인한 브라우저·위치(성남) 기준.
### 최근 요약 (10/28, 직전 10/27 대비)
### 최근 요약 (10/29, 직전 측정 대비 — 구글은 10/27, 네이버는 10/28)
- 새로 잡힘: 없음
- 빠짐: `성남 오늘 날씨` → 구글 2p8→-, 네이버 10→-. `고양 내일 날씨` → 구글 2p7→-. `수원 오늘 날씨` → 네이버 14→-. (구글 `site:weather.o2o.kr 성남` 은 9건 나와 색인은 살아 있음)
- 순위 바뀜: 없음 (`날씨각` 구글 1p1·네이버 1 그대로)
### 지난 요약 (10/28, 직전 10/27 대비)
- 새로 잡힘: `수원 오늘 날씨` → 네이버 14 (`/today/gyeonggi/suwon`)
- 순위 바뀜: `성남 오늘 날씨` → 네이버 6→10 (떨어짐)
@@ -424,18 +430,18 @@
실제 검색량이 큰 검색어 78개 + 날씨각. 구글 = 로그인 브라우저·성남 위치, 1~2페이지. 네이버 = 통합검색·웹 탭 첫 화면. `-` = 없음, `?` = 구글 차단으로 못 잼.
| 검색어 | 구글 10/26 | 구글 10/27 | 구글 10/28 | 네이버 10/26 | 네이버 10/27 | 네이버 10/28 |
|---|---|---|---|---|---|---|
| 날씨각 | 1p1 | 1p1 | 1p1 | 1 | 1 | 1 |
| 성남 오늘 날씨 | 2p10 `/today/gyeonggi/seongnam` | 2p8 | ? | 10 | 6 | 10 |
| 수원 오늘 날씨 | - | - | ? | - | - | 14 `/today/gyeonggi/suwon` |
| 고양 내일 날씨 | - | 2p7 `/tomorrow/gyeonggi/goyang` | ? | - | - | - |
| 군산 오늘 날씨 | 3p4 (2p 밖) | ? | ? | - | - | - |
| 오늘 날씨 · 내일 날씨 · 모레 날씨 · 이번주 날씨 · 주말 날씨 · 날씨 | - | - | ? | - | - | - |
| 서울 · 부산 · 인천 · 대전 · 광주 · 울산 · 세종 × 오늘/내일/날씨, 수원 내일·수원 날씨, 대구 날씨, 성남 내일·성남 날씨 | - | - | ? | - | - | - |
| 대구 오늘 날씨 · 대구 내일 날씨 | - | ? | ? | - | - | - |
| 고양 오늘·고양 날씨, 용인 · 창원 · 청주 · 천안 · 전주 × 오늘/내일/날씨 | - | - | ? | - | - | - |
| 군산 내일·군산 날씨, 포항 · 제주 · 김해 · 화성 · 부천 · 안산 · 남양주 × 오늘/내일/날씨 | - | ? | ? | - | - | - |
| 검색어 | 구글 10/26 | 구글 10/27 | 구글 10/28 | 구글 10/29 | 네이버 10/26 | 네이버 10/27 | 네이버 10/28 | 네이버 10/29 |
|---|---|---|---|---|---|---|---|---|
| 날씨각 | 1p1 | 1p1 | 1p1 | 1p1 | 1 | 1 | 1 | 1 |
| 성남 오늘 날씨 | 2p10 `/today/gyeonggi/seongnam` | 2p8 | ? | - | 10 | 6 | 10 | - |
| 수원 오늘 날씨 | - | - | ? | - | - | - | 14 `/today/gyeonggi/suwon` | - |
| 고양 내일 날씨 | - | 2p7 `/tomorrow/gyeonggi/goyang` | ? | - | - | - | - | - |
| 군산 오늘 날씨 | 3p4 (2p 밖) | ? | ? | - | - | - | - | - |
| 오늘 날씨 · 내일 날씨 · 모레 날씨 · 이번주 날씨 · 주말 날씨 · 날씨 | - | - | ? | - | - | - | - | - |
| 서울 · 부산 · 인천 · 대전 · 광주 · 울산 · 세종 × 오늘/내일/날씨, 수원 내일·수원 날씨, 대구 날씨, 성남 내일·성남 날씨 | - | - | ? | - | - | - | - | - |
| 대구 오늘 날씨 · 대구 내일 날씨 | - | ? | ? | - | - | - | - | - |
| 고양 오늘·고양 날씨, 용인 · 창원 · 청주 · 천안 · 전주 × 오늘/내일/날씨 | - | - | ? | - | - | - | - | - |
| 군산 내일·군산 날씨, 포항 · 제주 · 김해 · 화성 · 부천 · 안산 · 남양주 × 오늘/내일/날씨 | - | ? | ? | - | - | - | - | - |
- 서울·부산·인천·대구·대전·광주·울산은 시 단위 페이지가 없음(구 페이지만). '서울 날씨'를 받을 페이지 자체가 없다.
- 원본: `docs/search_log/{날짜}_naver_대표검색어.tsv`
+9 -1
View File
@@ -30,7 +30,7 @@ import { usePinnedLike } from './pinnedLike'
import { ShortsRail } from './Shorts'
import { FeedComposer, NearTalks, TalkGroup } from './talk'
import { topicName, useTalkGroups, useTodayMyTalks } from './talkState'
import { useRegion } from './regionContext'
import { useLandingAbout, useRegion } from './regionContext'
import { useSheet } from './sheetContext'
import { useSky } from './skyContext'
import { DayShareCard, DayShareGrid, GakShareCard, type DayShare } from './shareCards'
@@ -577,6 +577,7 @@ function SeasonBand({ news }: { news: BandArticle[] }) {
export function TodayPage() {
const { region } = useRegion()
const about = useLandingAbout()
const feed = useQuery(getFeedOptions({ query: { region: region.code } }))
const today = useQuery(getWeatherTodayOptions({ query: { region: region.code } }))
const { preview } = useSky()
@@ -682,6 +683,13 @@ export function TodayPage() {
{feed.isSuccess && spreadLeft}
{feed.isSuccess && bandAt.filter(([at]) => at > posts.length).map(([at, node]) => <Fragment key={at}>{node}</Fragment>)}
</div>
{about && (
<div
data-nosnippet
className="mx-4 mt-6 mb-4 text-[13px] leading-relaxed text-(--ink3) [&_a]:underline [&_h1]:mb-1 [&_h1]:text-[15px] [&_h1]:font-bold [&_h1]:text-(--ink2) [&_h2]:mt-4 [&_h2]:mb-1 [&_h2]:text-[14px] [&_h2]:font-bold [&_h2]:text-(--ink2) [&_h3]:mt-2 [&_h3]:font-semibold [&_li]:inline [&_li]:mr-2 [&_p]:my-1 [&_ul]:m-0 [&_ul]:p-0"
dangerouslySetInnerHTML={{ __html: about }}
/>
)}
</section>
)
}
+1 -7
View File
@@ -5,18 +5,12 @@ import { nearestRegion } from '@nalssigak/shared/api/client/sdk.gen'
import type { RegionData } from '@nalssigak/shared/api/client/types.gen'
import { track } from '../lib/analytics'
import { IS_TOSS, tossLocation } from '../lib/platform'
import { DEFAULT_REGION, ownPage, RegionContext, type LocateStatus } from './regionContext'
import { DEFAULT_REGION, ownPage, pageOf, RegionContext, type LocateStatus } from './regionContext'
const KEY = 'nalssigak.b.region'
type RegionPage = (typeof regionPages)[number]
/** /today/gyeonggi/seongnam, /tomorrow/gyeonggi/seongnam/bundang 같은 지역 페이지 주소면 그 페이지 */
function pageOf(pathname: string): RegionPage | undefined {
const path = pathname.match(/^\/(?:today|tomorrow)\/([a-z]+\/[a-z]+(?:\/[a-z]+)?)\/?$/)?.[1]
return path ? regionPages.find((p) => p.path === path) : undefined
}
/** 지역 페이지 안의 구: 구로 나뉜 시는 r 이 그 시 안이면 r, 아니면 시청이 있는 구 */
function regionIn(page: RegionPage, r?: RegionData | null): RegionData {
return page.regions.find((g) => g.code === r?.code) ?? page.regions.find((g) => g.code === page.main)!
+16
View File
@@ -1,4 +1,5 @@
import { createContext, use } from 'react'
import { useLocation } from 'react-router'
import type { RegionData } from '@nalssigak/shared/api/client/types.gen'
import regionPages from '../../seo/region.json'
@@ -11,6 +12,21 @@ export { DEFAULT_REGION } from '@nalssigak/shared/lib'
/** 구 하나만 보여 주는 지역 페이지: 일반 시군구, 또는 구로 나뉜 시의 구 페이지 */
export const ownPage = (code: string) => regionPages.find((p) => p.regions.length === 1 && p.regions[0].code === code)
/** /today/gyeonggi/seongnam, /tomorrow/gyeonggi/seongnam/bundang 같은 지역 페이지 주소면 그 페이지 */
export function pageOf(pathname: string) {
const path = pathname.match(/^\/(?:today|tomorrow)\/([a-z]+\/[a-z]+(?:\/[a-z]+)?)\/?$/)?.[1]
return path ? regionPages.find((p) => p.path === path) : undefined
}
/** 지역 페이지로 들어오면 서버가 채운 소개 글(#root 안)을 앱이 덮기 전에 잡아 둔다. 구글은 JS 실행 뒤 화면으로 색인한다 */
const landingAbout = pageOf(location.pathname) ? { path: location.pathname, html: document.querySelector('#root > main')?.innerHTML ?? '' } : null
/** 들어온 지역 페이지에 그대로 있을 때만 그 소개 글 */
export function useLandingAbout(): string | null {
const { pathname } = useLocation()
return landingAbout?.html && landingAbout.path === pathname ? landingAbout.html : null
}
export const RegionContext = createContext<RegionApi | null>(null)
export function useRegion() {