{"id":1588,"date":"2024-01-29T12:05:18","date_gmt":"2024-01-29T03:05:18","guid":{"rendered":"https:\/\/dohokin.com\/?p=1588"},"modified":"2024-01-29T12:08:18","modified_gmt":"2024-01-29T03:08:18","slug":"%ed%8c%8c%ec%9d%b4%ec%8d%ac%ec%9c%bc%eb%a1%9c-%eb%b7%b0%ed%8b%b0%ed%92%80%ed%8c%8c%ec%9d%b4%eb%a5%bc-%ec%9d%b4%ec%9a%a9%ed%95%b4%ec%84%9c-%ed%81%ac%eb%a1%a4%eb%a7%81-%ed%95%98%eb%8a%94-%eb%b0%a9","status":"publish","type":"post","link":"https:\/\/dohokin.com\/?p=1588","title":{"rendered":"\ud30c\uc774\uc36c\uc73c\ub85c \ubdf0\ud2f0\ud480\ud30c\uc774\ub97c \uc774\uc6a9\ud574\uc11c \ud06c\ub864\ub9c1 \ud558\ub294 \ubc29\ubc95"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-30.png\" alt=\"\" class=\"wp-image-1590\"\/><\/figure>\n\n\n\n<p>\ud30c\uc774\uc36c\uc5d0\uc11c BeautifulSoup\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc6f9 \ud06c\ub864\ub9c1\uc744 \ud558\ub294 \ubc29\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. \uc774 \uc608\uc2dc\uc5d0\uc11c\ub294 <code>requests<\/code> \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc6f9 \ud398\uc774\uc9c0\uc758 HTML\uc744 \uac00\uc838\uc624\uace0, <code>BeautifulSoup<\/code>\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ub97c \ud30c\uc2f1\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<ol>\n<li><strong>\ud544\uc694\ud55c \ub77c\uc774\ube0c\ub7ec\ub9ac \uc124\uce58\ud558\uae30<\/strong>:<br>\uba3c\uc800, <code>beautifulsoup4<\/code>\uc640 <code>requests<\/code> \ub77c\uc774\ube0c\ub7ec\ub9ac\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc774\ub4e4\uc740 \ud30c\uc774\uc36c\uc73c\ub85c \uc6f9 \ud06c\ub864\ub9c1\uc744 \ud560 \ub54c \ud754\ud788 \uc0ac\uc6a9\ub418\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. \uc544\ub798\uc758 \uba85\ub839\uc5b4\ub85c \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"   pip install beautifulsoup4 requests\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">   <\/span><span style=\"color: #FFCB6B\">pip<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">install<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">beautifulsoup4<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">requests<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"2\">\n<li><strong>\ub77c\uc774\ube0c\ub7ec\ub9ac \uc784\ud3ec\ud2b8\ud558\uae30<\/strong>:<br>\ud30c\uc774\uc36c \uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c \ud544\uc694\ud55c \ubaa8\ub4c8\uc744 \uc784\ud3ec\ud2b8\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"   import requests\n   from bs4 import BeautifulSoup\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">   <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #BABED8\"> requests<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">   <\/span><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #BABED8\"> bs4 <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #BABED8\"> BeautifulSoup<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"3\">\n<li><strong>\uc6f9 \ud398\uc774\uc9c0 \uac00\uc838\uc624\uae30<\/strong>:<br><code>requests<\/code>\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc6f9 \ud398\uc774\uc9c0\uc758 HTML\uc744 \uac00\uc838\uc635\ub2c8\ub2e4.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"   url = 'http:\/\/example.com'  # \ud06c\ub864\ub9c1\ud560 \uc6f9\uc0ac\uc774\ud2b8 \uc8fc\uc18c\n   response = requests.get(url)\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">   url <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">http:\/\/example.com<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #BABED8\">  <\/span><span style=\"color: #464B5D; font-style: italic\"># \ud06c\ub864\ub9c1\ud560 \uc6f9\uc0ac\uc774\ud2b8 \uc8fc\uc18c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">   response <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> requests<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">get<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">url<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"4\">\n<li><strong>BeautifulSoup \uac1d\uccb4 \uc0dd\uc131\ud558\uae30<\/strong>:<br>\uac00\uc838\uc628 HTML\uc744 <code>BeautifulSoup<\/code> \uac1d\uccb4\ub85c \ubcc0\ud658\ud558\uc5ec \ud30c\uc2f1\ud560 \uc218 \uc788\uac8c \ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"   soup = BeautifulSoup(response.text, 'html.parser')\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">   soup <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #82AAFF\">BeautifulSoup<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">response<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">text<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">html.parser<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"5\">\n<li><strong>\ud544\uc694\ud55c \ub370\uc774\ud130 \ucc3e\uae30<\/strong>:<br><code>soup.find()<\/code> \ub610\ub294 <code>soup.find_all()<\/code> \uba54\uc11c\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud544\uc694\ud55c \ub370\uc774\ud130\uac00 \uc788\ub294 HTML \ud0dc\uadf8\ub97c \ucc3e\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"   # \uc608\uc2dc: \ubaa8\ub4e0 <a&gt; \ud0dc\uadf8 \ucc3e\uae30\n   links = soup.find_all('a')\n   for link in links:\n       print(link.get('href'))  # \ub9c1\ud06c URL \ucd9c\ub825\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">   <\/span><span style=\"color: #464B5D; font-style: italic\"># \uc608\uc2dc: \ubaa8\ub4e0 &lt;a&gt; \ud0dc\uadf8 \ucc3e\uae30<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">   links <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> soup<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">find_all<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">a<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">   <\/span><span style=\"color: #89DDFF; font-style: italic\">for<\/span><span style=\"color: #BABED8\"> link <\/span><span style=\"color: #89DDFF; font-style: italic\">in<\/span><span style=\"color: #BABED8\"> links<\/span><span style=\"color: #89DDFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">       <\/span><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">link<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">get<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">href<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #89DDFF\">))<\/span><span style=\"color: #BABED8\">  <\/span><span style=\"color: #464B5D; font-style: italic\"># \ub9c1\ud06c URL \ucd9c\ub825<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"6\">\n<li><strong>\ub370\uc774\ud130 \ucd94\ucd9c \ubc0f \uc0ac\uc6a9<\/strong>:<br>\ud544\uc694\ud55c \ub370\uc774\ud130\ub97c \ucd94\ucd9c\ud558\uc5ec \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n\n\n\n<p>\uc774 \ubc29\ubc95\uc73c\ub85c \ub2e4\uc591\ud55c \uc6f9\uc0ac\uc774\ud2b8\uc758 \ub370\uc774\ud130\ub97c \ud06c\ub864\ub9c1\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ud558\uc9c0\ub9cc \uc6f9\uc0ac\uc774\ud2b8\uc758 \ud06c\ub864\ub9c1 \uc815\ucc45\uc744 \ud655\uc778\ud558\uace0, \ud574\ub2f9 \uc0ac\uc774\ud2b8\uc758 \uc11c\ube44\uc2a4 \uc57d\uad00\uc744 \uc900\uc218\ud558\ub294\uc9c0 \ud655\uc778\ud558\ub294 \uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4. \ub610\ud55c, \uc6f9\uc0ac\uc774\ud2b8\uc5d0 \uacfc\ub3c4\ud55c \uc694\uccad\uc744 \ubcf4\ub0b4 \uc11c\ubc84\uc5d0 \ubd80\ub2f4\uc744 \uc8fc\uc9c0 \uc54a\ub3c4\ub85d \uc8fc\uc758\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\ub124\uc774\ubc84\uc5d0\uc11c \ud64d\uc0bc\uc744 \uac80\uc0c9\ud558\uace0, \uad11\uace0\ub294 \uc81c\uc678\ud558\uace0 \uae00 \uc81c\ubaa9 \ubd88\ub7ec\uc624\ub294 \ucf54\ub4dc\ub97c \uc608\uc81c\ub85c \uc791\uc131\ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"962\" src=\"https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-31-1024x962.png\" alt=\"\" class=\"wp-image-1592\" style=\"width:800px\" srcset=\"https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-31-1024x962.png 1024w, https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-31-300x282.png 300w, https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-31-768x722.png 768w, https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-31.png 1291w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>&#8211;<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"import requests\nfrom bs4 import BeautifulSoup\n\n\nheader_user = {\n    &quot;User-Agent&quot;: &quot;Mozilla\/5.0 (Linux; Android 6.0; Nexus 5 Build\/MRA58N) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/120.0.0.0 Mobile Safari\/537.36&quot;\n}\n\n# \uc811\uc18d\ud558\uace0\uc790 \ud558\ub294 url \uc785\ub825.\n\nbase_url = &quot;https:\/\/search.naver.com\/search.naver?where=view&amp;sm=tab_jum&amp;query=&quot;\n# search_url = input(&quot;\uac80\uc0c9\uc5b4\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694 : &quot;)\nsearch_url = &quot;\ud64d\uc0bc&quot;\n\nurl = base_url + search_url\nreq = requests.get(url, headers=header_user)\n\nhtml = req.text\nsoup = BeautifulSoup(html, &quot;html.parser&quot;)\n\n\nquery = soup.select(&quot;.view_wrap&quot;)\n\nfor x in query:\n    ad = x.select_one(&quot;.spview.ico_ad&quot;)\n    if ad:\n        continue\n\n    else:\n        title = x.select_one(&quot;.title_link._cross_trigger&quot;)\n        name = x.select_one(&quot;.user_info &gt; a&quot;)\n        tag = title[&quot;href&quot;]\n        print(f&quot;\ud83d\udd3d\\n\uae00 \uc81c\ubaa9 : {title.text}\\n\uae00 \uc791\uc131\uc790 : {name.text}\\n\uae00 \ub9c1\ud06c : {tag}\\n\\n&quot;)\n\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #BABED8\"> requests<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #BABED8\"> bs4 <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #BABED8\"> BeautifulSoup<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">header_user <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">User-Agent<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Mozilla\/5.0 (Linux; Android 6.0; Nexus 5 Build\/MRA58N) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/120.0.0.0 Mobile Safari\/537.36<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #464B5D; font-style: italic\"># \uc811\uc18d\ud558\uace0\uc790 \ud558\ub294 url \uc785\ub825.<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">base_url <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">https:\/\/search.naver.com\/search.naver?where=view&amp;sm=tab_jum&amp;query=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #464B5D; font-style: italic\"># search_url = input(&quot;\uac80\uc0c9\uc5b4\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694 : &quot;)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">search_url <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">\ud64d\uc0bc<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">url <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> base_url <\/span><span style=\"color: #89DDFF\">+<\/span><span style=\"color: #BABED8\"> search_url<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">req <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> requests<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">get<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">url<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #BABED8; font-style: italic\">headers<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #82AAFF\">header_user<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">html <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> req<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">text<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">soup <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #82AAFF\">BeautifulSoup<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">html<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">html.parser<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">query <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> soup<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">select<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">.view_wrap<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">for<\/span><span style=\"color: #BABED8\"> x <\/span><span style=\"color: #89DDFF; font-style: italic\">in<\/span><span style=\"color: #BABED8\"> query<\/span><span style=\"color: #89DDFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    ad <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> x<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">select_one<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">.spview.ico_ad<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF; font-style: italic\">if<\/span><span style=\"color: #BABED8\"> ad<\/span><span style=\"color: #89DDFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        <\/span><span style=\"color: #89DDFF; font-style: italic\">continue<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF; font-style: italic\">else<\/span><span style=\"color: #89DDFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        title <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> x<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">select_one<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">.title_link._cross_trigger<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        name <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> x<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">select_one<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">.user_info &gt; a<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        tag <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> title<\/span><span style=\"color: #89DDFF\">[<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">href<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">]<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        <\/span><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;\ud83d\udd3d<\/span><span style=\"color: #BABED8\">\\n<\/span><span style=\"color: #C3E88D\">\uae00 \uc81c\ubaa9 : <\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">title<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">text<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #BABED8\">\\n<\/span><span style=\"color: #C3E88D\">\uae00 \uc791\uc131\uc790 : <\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">name<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">text<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #BABED8\">\\n<\/span><span style=\"color: #C3E88D\">\uae00 \ub9c1\ud06c : <\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">tag<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #BABED8\">\\n\\n<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\uc774 \ucf54\ub4dc\ub294 \ub124\uc774\ubc84\uc5d0\uc11c &#8216;\ud64d\uc0bc&#8217;\uc744 \uac80\uc0c9\ud558\uace0 \uadf8 \uacb0\uacfc\ub97c \uac00\uc838\uc624\ub294 \uc6f9 \ud06c\ub864\ub9c1 \uc2a4\ud06c\ub9bd\ud2b8\uc785\ub2c8\ub2e4. \uac01 \uc904\uc5d0 \ub300\ud55c \ubd84\uc11d\uacfc \uc124\uba85\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"import requests\nfrom bs4 import BeautifulSoup\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #BABED8\"> requests<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #BABED8\"> bs4 <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #BABED8\"> BeautifulSoup<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li><code>requests<\/code>\uc640 <code>BeautifulSoup<\/code> \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc784\ud3ec\ud2b8\ud569\ub2c8\ub2e4. <code>requests<\/code>\ub294 \uc6f9 \ud398\uc774\uc9c0\uc5d0 \uc694\uccad\uc744 \ubcf4\ub0b4\uae30 \uc704\ud574, <code>BeautifulSoup<\/code>\ub294 \uc751\ub2f5\ubc1b\uc740 HTML\uc744 \ud30c\uc2f1\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"header_user = {\n    &quot;User-Agent&quot;: &quot;...&quot;\n}\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">header_user <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">User-Agent<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">...<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>\uc0ac\uc6a9\uc790 \uc5d0\uc774\uc804\ud2b8(User-Agent)\ub97c \uc815\uc758\ud569\ub2c8\ub2e4. \uc774\ub294 \ud06c\ub864\ub9c1\ud558\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc6f9 \ube0c\ub77c\uc6b0\uc800\ucc98\ub7fc \ubcf4\uc774\uac8c \ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \uc5ec\uae30\uc11c\ub294 \ubaa8\ubc14\uc77c \ube0c\ub77c\uc6b0\uc800\ub85c \uc124\uc815\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"base_url = &quot;https:\/\/search.naver.com\/search.naver?where=view&amp;sm=tab_jum&amp;query=&quot;\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">base_url <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">https:\/\/search.naver.com\/search.naver?where=view&amp;sm=tab_jum&amp;query=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>\ub124\uc774\ubc84 \uac80\uc0c9 URL\uc758 \uae30\ubcf8 \ud615\ud0dc\ub97c \uc815\uc758\ud569\ub2c8\ub2e4. \uc774 URL\uc5d0 \uac80\uc0c9\uc5b4\ub97c \ucd94\uac00\ud558\uc5ec \uc804\uccb4 \uac80\uc0c9 URL\uc744 \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"search_url = &quot;\ud64d\uc0bc&quot;\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">search_url <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">\ud64d\uc0bc<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>\uac80\uc0c9\ud558\uace0\uc790 \ud558\ub294 \ud0a4\uc6cc\ub4dc\ub97c &#8216;\ud64d\uc0bc&#8217;\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. \uc774 \ubd80\ubd84\uc744 \ub2e4\ub978 \ud0a4\uc6cc\ub4dc\ub85c \ubcc0\uacbd\ud558\uba74 \ub2e4\ub978 \uac80\uc0c9 \uacb0\uacfc\ub97c \uc5bb\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"url = base_url + search_url\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">url <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> base_url <\/span><span style=\"color: #89DDFF\">+<\/span><span style=\"color: #BABED8\"> search_url<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>\uae30\ubcf8 URL\uacfc \uac80\uc0c9\uc5b4\ub97c \uacb0\ud569\ud558\uc5ec \uac80\uc0c9\uc744 \uc704\ud55c \ucd5c\uc885 URL\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"req = requests.get(url, headers=header_user)\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">req <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> requests<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">get<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">url<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #BABED8; font-style: italic\">headers<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #82AAFF\">header_user<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>\ucd5c\uc885 URL\ub85c <code>requests.get<\/code> \uba54\uc18c\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec HTTP GET \uc694\uccad\uc744 \ubcf4\ub0c5\ub2c8\ub2e4. \uc774\ub54c \uc55e\uc11c \uc815\uc758\ud55c \uc0ac\uc6a9\uc790 \uc5d0\uc774\uc804\ud2b8\ub97c \ud5e4\ub354\uc5d0 \ud3ec\ud568\uc2dc\ud0b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"html = req.text\nsoup = BeautifulSoup(html, &quot;html.parser&quot;)\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">html <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> req<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">text<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">soup <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #82AAFF\">BeautifulSoup<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">html<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">html.parser<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>\uc751\ub2f5\ubc1b\uc740 HTML\uc744 \ubb38\uc790\uc5f4\ub85c \uc800\uc7a5\ud558\uace0, <code>BeautifulSoup<\/code>\uc744 \uc0ac\uc6a9\ud558\uc5ec HTML\uc744 \ud30c\uc2f1\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"query = soup.select(&quot;.view_wrap&quot;)\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">query <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> soup<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">select<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">.view_wrap<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>\uac80\uc0c9 \uacb0\uacfc \ud398\uc774\uc9c0\uc5d0\uc11c \ud074\ub798\uc2a4 \uc774\ub984\uc774 &#8216;view_wrap&#8217;\uc778 \ubaa8\ub4e0 \uc694\uc18c\ub97c \ucc3e\uc2b5\ub2c8\ub2e4. \uc774 \ud074\ub798\uc2a4\ub294 \ub124\uc774\ubc84 \uac80\uc0c9 \uacb0\uacfc\uc758 \uac01 \ud56d\ubaa9\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"for x in query:\n    ad = x.select_one(&quot;.spview.ico_ad&quot;)\n    if ad:\n        continue\n    else:\n        title = x.select_one(&quot;.title_link._cross_trigger&quot;)\n        name = x.select_one(&quot;.user_info &gt; a&quot;)\n        tag = title[&quot;href&quot;]\n        print(f&quot;\ud83d\udd3d\\n\uae00 \uc81c\ubaa9 : {title.text}\\n\uae00 \uc791\uc131\uc790 : {name.text}\\n\uae00 \ub9c1\ud06c : {tag}\\n\\n&quot;)\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">for<\/span><span style=\"color: #BABED8\"> x <\/span><span style=\"color: #89DDFF; font-style: italic\">in<\/span><span style=\"color: #BABED8\"> query<\/span><span style=\"color: #89DDFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    ad <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> x<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">select_one<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">.spview.ico_ad<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF; font-style: italic\">if<\/span><span style=\"color: #BABED8\"> ad<\/span><span style=\"color: #89DDFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        <\/span><span style=\"color: #89DDFF; font-style: italic\">continue<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF; font-style: italic\">else<\/span><span style=\"color: #89DDFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        title <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> x<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">select_one<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">.title_link._cross_trigger<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        name <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> x<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">select_one<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">.user_info &gt; a<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        tag <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #BABED8\"> title<\/span><span style=\"color: #89DDFF\">[<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">href<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">]<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">        <\/span><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;\ud83d\udd3d<\/span><span style=\"color: #BABED8\">\\n<\/span><span style=\"color: #C3E88D\">\uae00 \uc81c\ubaa9 : <\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">title<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">text<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #BABED8\">\\n<\/span><span style=\"color: #C3E88D\">\uae00 \uc791\uc131\uc790 : <\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">name<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">text<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #BABED8\">\\n<\/span><span style=\"color: #C3E88D\">\uae00 \ub9c1\ud06c : <\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">tag<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #BABED8\">\\n\\n<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>\uac01 \uac80\uc0c9 \uacb0\uacfc \ud56d\ubaa9\uc5d0 \ub300\ud574 \ub8e8\ud504\ub97c \ub3cc\uba74\uc11c \ub2e4\uc74c\uc744 \uc218\ud589\ud569\ub2c8\ub2e4:<\/li>\n\n\n\n<li><code>ad = x.select_one(\".spview.ico_ad\")<\/code>: \uad11\uace0\uc778\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><code>if ad: continue<\/code>: \ud56d\ubaa9\uc774 \uad11\uace0\ub77c\uba74 \ub2e4\uc74c \ud56d\ubaa9\uc73c\ub85c \ub118\uc5b4\uac11\ub2c8\ub2e4.<\/li>\n\n\n\n<li><code>title = x.select_one(\".title_link._cross_trigger\")<\/code>: \uac80\uc0c9 \uacb0\uacfc\uc758 \uc81c\ubaa9\uc744 \ucc3e\uc2b5\ub2c8\ub2e4.<\/li>\n\n\n\n<li><code>name = x.select_one(\".user_info &gt; a\")<\/code>: \uc791\uc131\uc790\uc758 \uc774\ub984\uc744 \ucc3e\uc2b5\ub2c8\ub2e4.<\/li>\n\n\n\n<li><code>tag = title[\"href\"]<\/code>: \uac80\uc0c9 \uacb0\uacfc\uc758 \ub9c1\ud06c(URL)\uc744 \uac00\uc838\uc635\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\ub9c8\uc9c0\ub9c9\uc73c\ub85c \uc81c\ubaa9, \uc791\uc131\uc790, \ub9c1\ud06c\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"348\" src=\"https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-32-1024x348.png\" alt=\"\" class=\"wp-image-1593\" srcset=\"https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-32-1024x348.png 1024w, https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-32-300x102.png 300w, https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-32-768x261.png 768w, https:\/\/dohokin.com\/wp-content\/uploads\/2024\/01\/image-32.png 1235w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\ud30c\uc774\uc36c\uc73c\ub85c \ubdf0\ud2f0\ud480\ud30c\uc774\ub97c \uc774\uc6a9\ud574\uc11c \ud06c\ub864\ub9c1 \ud558\ub294 \ubc29\ubc95<\/p>\n","protected":false},"author":1,"featured_media":1590,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1],"tags":[112,111,106],"_links":{"self":[{"href":"https:\/\/dohokin.com\/index.php?rest_route=\/wp\/v2\/posts\/1588"}],"collection":[{"href":"https:\/\/dohokin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dohokin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dohokin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dohokin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1588"}],"version-history":[{"count":6,"href":"https:\/\/dohokin.com\/index.php?rest_route=\/wp\/v2\/posts\/1588\/revisions"}],"predecessor-version":[{"id":1599,"href":"https:\/\/dohokin.com\/index.php?rest_route=\/wp\/v2\/posts\/1588\/revisions\/1599"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dohokin.com\/index.php?rest_route=\/wp\/v2\/media\/1590"}],"wp:attachment":[{"href":"https:\/\/dohokin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dohokin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dohokin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}