jupyter notebook 정지하기 jupyter notebook stop 8888
from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument('headless') options.add_argument('window-size=1920x1080') options.add_argument("disable-gpu") # 혹은 options.add_argument("--disable-gpu") driver = webdriver.Chrome('chromedriver', chrome_options=options) driver.get('http://naver.com') driver.implicitly_wait(3) driver.get_screenshot_as_file('naver_main_headless..
https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/ How to Setup Selenium with ChromeDriver on Ubuntu 18.04 & 16.04 – TecAdmin How to setup Selenium with ChromeDriver on Ubuntu, and LinuxMint systems. An example of Java program which uses Selenium standalone server tecadmin.net 여기서는 우분투 서버에 스탠드얼론 셀레니움서버(standalone selenium server)를 설치하는 방법을 설명합니다. Xvfb 등을 통해 셀레니움을 쉘환경에서 사용할 수 있게 됩니다. #xv..
크롬북 linux (beta) 기능 활성화 후 주피터 설치 shell> pip install jupyter 주피터 실행 shell> jupyter notebook chrome webdriver 의 위치 /usr/bin/chromedriver browser = webdriver.Chrome('/usr/bin/chromedriver') 아니면, apt-get install chromedriver sudo find / -name chromedriver
아나콘다 사용 anaconda navigator 실행 후 파이썬 버전, pip 등 관리가능하다. jupyter notebook 실행 하면 프로그래밍 시간 단축에 큰 도움이 된다. selenium 크롬 웹드라이버는 업데이트 되면 새로 다운로드 받아 저장한다. pip install chromedriver python 실행 파일과 같은 곳에 두어도 되고, 다른 곳에 두어도 된다. browser.implicitly_wait(1) 는 get 보다 먼저 나와서 시간 설정 browser = webdriver.Chrome('./chromedriver') browser.implicitly_wait(1) browser.get(url) 와 같이 띄워쓰기로 클래스 이름이 여러개인 경우 하나만 검색가능하다. a = browse..
리눅스 쉘에서는 명령이 실행되지만, crontab 등록을 통해서는 실행이 되지않는 경우가 있다. 이것때문에 많은 시간을 삽질한 적이 있다. 왜 crontab에서는 명령이 실행되지않는 것일까? 결론부터 말하자면 환경변수 문제였다. 어떤계정에서 crontab작동하도록 명령하지않는 다.. 그냥 시간되면 지 스스로 작동하기에 환경변수 따위가 없다.. 가져올 환경변수가 없으므로 작동하지 않는 건 당연하다. crontab에서 환경변수를 설정해주면 이 문제는 간단히 해결된다. crontab -e에서 HELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin 맨윗줄에 이런식으로 적어주면 된다..