- 공공기관2/3 작업본 + 오늘 제출 17곳 D~J 카테고리 셀병합 정상화 - 한국지역난방공사 옵션2(고아셀 F98 수정)+전행 높이17 - 제출_프리랜서2_2026-06-21.zip 생성(17개 xlsx, 2,468행) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
688 B
Python
13 lines
688 B
Python
import requests,re
|
|
import urllib3; urllib3.disable_warnings()
|
|
H={'User-Agent':'Mozilla/5.0','X-Requested-With':'XMLHttpRequest'}
|
|
# inspect 한난사보 page for ajax url / data attributes
|
|
r=requests.get("https://www.kdhc.co.kr/kdhc/prCnter/cyclb/list.do?prTargetSe=2&menuNo=200127",headers=H,timeout=20,verify=False)
|
|
for m in re.findall(r'(selpubList|selectList|ajax|\.do)[^"\']{0,80}',r.text)[:20]:
|
|
print(m)
|
|
print('=== look for data- attrs / list container ids ===')
|
|
from bs4 import BeautifulSoup
|
|
s=BeautifulSoup(r.content,'html.parser')
|
|
for d in s.select('[id*=list],[class*=list],[id*=gallery],[class*=gallery],[class*=cyclb]')[:15]:
|
|
print(d.name, d.get('id'), d.get('class'))
|