{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "ede03008-a35d-4d65-8a64-ddf4bc5c4d41",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'www.cleaneye.go.kr'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n",
      "  warnings.warn(\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['siteHome', 'skipNavi', 'sitemapDivBG', 'sitemapDiv', 'sitemapWrap', 'sitemap', 'target_01', 'target_02', 'target_03', 'target_04', 'target_05', 'target_06', 'closeSitemap', 'mobileNavWrap', 'mSearch', 'mMenu', 'mLogo', 'headerDiv', 'topWrap', 'logo', 'mainNav', 'mainGNB', 'topSearch', 'totalSearchFormAction', 'skyBannerWarp', 'skyBannerLastElement', 'topWrapBg', 'topMenu', 'topSubMenu', 'targetEntId', 'targetEntName', 'targetEntKind', 'inputEntId', 'inputItemNo', 'locationDiv', 'container', 'contents', 'printBtn', 'frameTop', 'ceBox', 'frameLeft', 'frameContents', 'footerDiv', 'footerNavWarp', 'fncTermsDicLi', 'emailRejectLi', 'copyrightPolicyLi', 'prvcPrcsMthd', 'footerCopyWarp', 'copyright', 'logoBtm', 'pcShowBtn', 'gongsiInfoPop', 'gongsiInfoPopBody', 'popContents']\n"
     ]
    }
   ],
   "source": [
    "import requests\n",
    "from bs4 import BeautifulSoup\n",
    "\n",
    "url = 'http://www.cleaneye.go.kr/user/iptItemGongsi.do'\n",
    "response = requests.get(url, verify=False)  # SSL 인증서 검증 활성화\n",
    "\n",
    "soup = BeautifulSoup(response.content, 'html.parser')\n",
    "\n",
    "# 원하는 데이터 추출\n",
    "# 예시: id가 있는 요소를 스크래핑하는 경우\n",
    "ids = [tag['id'] for tag in soup.find_all(id=True)]\n",
    "\n",
    "print(ids)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "510c9fd5-a337-433f-98d6-7c3731499f9d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
