from playwright.sync_api import sync_playwright
URL='https://padlet.com/midam_/2026-1-4-1-2-rrerm1h0ef436sx9'
with sync_playwright() as p:
    browser = p.chromium.launch(headless=False, executable_path='/usr/bin/chromium-browser', args=['--no-sandbox'])
    page = browser.new_page(viewport={'width': 1600, 'height': 1200})
    page.goto(URL, wait_until='networkidle', timeout=120000)
    candidates = ['더보기', '첨부파일 다운로드', '다운로드', '⋮', '...']
    for text in candidates:
        try:
            count = page.get_by_text(text, exact=False).count()
        except Exception:
            count = 'err'
        print(text, count)
    print('buttons with aria-labels:')
    btns = page.locator('button').evaluate_all("els => els.slice(0,80).map(e => ({txt:(e.innerText||'').trim(), aria:e.getAttribute('aria-label'), title:e.getAttribute('title')}))")
    for b in btns:
        if b['txt'] or b['aria'] or b['title']:
            print(b)
    browser.close()
