Skip to content

Instantly share code, notes, and snippets.

@osori osori/
Last active Nov 24, 2017

What would you like to do?
# Jupyter Notebook에서 실행하세요
from IPython.display import Image, display
from bs4 import BeautifulSoup
import requests
print("어서오세요 품격과 전통의 판교 현백입니다.\n 어떤 물건을 찾으세요?")
query = input() # 유저 인풋 받아오기
response = requests.get("" +
"searchQuery=" + query)
soup = BeautifulSoup(response.text, 'html.parser')
products ='#product-list li .prod-unit')
for idx, product in enumerate(products):
img_url = product.find('img')['src']
price = product.find('div', class_='price-info').text.strip().splitlines()[0]
name = product.find('a', class_='title ellipsis').text
print(f'{idx}. {name}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.