DataScience/Crawling3 pandas selenium base64 재미로 보는 예제 In [ ]: import pandas as pd In [ ]: # 부재료 - 시트1.csv 파일을 판다스로 읽어옵니다 df2 = pd.read_csv('부재료가공완료.csv', encoding='utf-8') # df2 index를 1부터 시작하게 바꿔줍니다 df2.index = range(1, len(df2) + 1) df2 Out[ ]: 재료 사진 Unnamed: 2 1 소주잔 NaN https://www.google.com/imgres?imgurl=https%3A%... 2 맥주잔 NaN https://www.google.com/imgres?imgurl=https%3A%... 3 얼음 NaN https://www.google.com/imgres?imgurl=http%3A%2... 4 토닉워터 Na.. 2023. 3. 7. Crawling 구글자동검색이미지다운 1.필요한 라이브러리를 그냥많이 불러온다 import requests from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.keys import Keys import time import pandas as pd import numpy as np import csv import os from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.. 2023. 3. 6. Selenium 구글웹드라이버 사용 기본 from selenium import webdriver # 웹 브라우저 제어 from urllib.parse import quote_plus # 한글 검색어를 URL에 사용할 수 있도록 인코딩 import time from selenium.webdriver.common.by import By # 웹 요소를 찾기 위한 방법을 지정 from selenium.webdriver.common.keys import Keys # 키보드 입력을 위한 키를 지정 import numpy as np # 필요한 옵션 설정 chrome_options = webdriver.ChromeOptions() # 크롬 옵션 설정 chrome_options.add_argument('--headless') # 브라우저를 띄우지 않고 백그라운.. 2023. 2. 24. 이전 1 다음