๋ค์ด๋ฒ์ผํ ์ง๋ฌธ ์์ต๋๋ค!
์ด๋ฏธ ๊ทธ๋ ๊ฒ๋ ์งํํด๋ดค๋๋ฐ ๊ทธ๋ ๊ฒํด๋ 40๊ฐ์ค์ 2๊ฐ์ ์ธ๋ค์ผ ๋งํฌ๋ง ๊ฐ์ ธ์์ต๋๋ค ใ
ใ
๋ช์ผ๋์ gpt 4o๋ก ๋ถ์ํ๋ฉด์ ๊ณ์ํด๋ดค๋๋ฐ๋ ๋์ผํํ์ ์ด์์ต๋๋ค40 (์ด40๊ฐ์ํ์ค ์๋ 2๊ฐ ๋งํฌ๋ง ๊ฐ์ ธ์ด )https://shopping-phinf.pstatic.net/main_8617681/86176813957.1.jpg?type=f140 https://shopping-phinf.pstatic.net/main_4880094/48800941696.jpg?type=f140items = soup.select(".product_item__MDtDF") print(len(items)) for item in items: # ์ด๋ฏธ์ง URL ์ฐพ๊ธฐ img = item.select_one(".product_img_area__cUrko img") if img: # src ์์ฑ ํ์ธ img_src = img.get('src') # data-src ์์ฑ ํ์ธ img_data_src = img.get('data-src') # ์ด๋ฏธ์ง URL ์ถ๋ ฅ print(img_src if img_src else img_data_src)