beautifulsoup(3)
-
Naver Image Crawling
from urllib.request import urlopen from urllib.parse import quote_plus from bs4 import BeautifulSoup from selenium import webdriver print("라이브러리 임포트 완료\n".rjust(20, '-')) base_url = "https://search.naver.com/search.naver?where=image&sm=tab_jum&query=" plus_url = input("무엇을 검색하시겠습니까? ") url = base_url + quote_plus(plus_url) print(url) html = urlopen(url).read() soup = BeautifulSoup(html, 'html.pa..
2020.04.17 -
Google Image Crawling
import errno import sys, os from bs4 import BeautifulSoup from selenium import webdriver import urllib, urllib.request import requests import random import time from selenium.webdriver.common.keys import Keys folder = "image" url = "https://www.google.com/search" webDriver = "chromedriver.exe" searchItem = input("검색어를 입력하세요: ") size = 300 params = { "q": searchItem , "tbm": "isch" , "sa": "1" , ..
2020.04.17 -
메일 자동화 (Python)
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains import time print("라이브러리 임포트 완료".rjust(20, '-')) # 드라이버 준비 driver = webdriver.Chrome() url = "https://www.google.com" driver.get(url) # driver.maximize_window() # 드라이버 제어 변수 설정 action = ActionChains(driver) #로그인 버튼 클릭 (#은 id) driver.find_element_by_css_s..
2020.04.17