본문 바로가기

분류 전체보기

[Javascript] html2canvas 로그 제거 기본적으로 html2canvas를 사용시 console 창에 로그가 발생함 logging 옵션 설정에 따라서 console 창에 로그 활성화 상태 변경 가능 html2canvas($("#imgDiv")[0], { logging: false, })
[Javascript] html2canvas 가운데 정렬 div 영역을 이미지로 변경 시 한쪽에 여백이 생기는 경우 발생 하기 옵션 추가 시 여백 없이 이미지로 변경 가능 html2canvas($("#imgDiv")[0], { scrollX: -window.scrollX, scrollY: -window.scrollY, windowWidth: document.documentElement.offsetWidth, windowHeight: document.documentElement.offsetHeight })
[Javascript] html2canvas 이미지 저장 시 특정 영역 제외 워하는 부분에 'data-html2canvas-ignore' 속성을 추가해서 제외할 수 있음 보이는 영역 제외 영역 보이는 영역
[Javascript] html2canvas 를 이용한 특정 영역 이미지 저장 라이브러리는 사이트에서 다운로드 html2canvas.hertzen.com html2canvas - Screenshots with JavaScript Try out html2canvas Test out html2canvas by rendering the viewport from the current page. Capture html2canvas.hertzen.com 사용방법 이미지로 저장
[Highcharts] credits 링크 제거 화면 캡쳐를 하는 경우 등 우측하단에 있는 credits("highcharts.com" 로고)을 제거하고 싶은 경우가 있음 하기 코드를 넣으면 credits를 제거할 수 있음 credits : { enabled : false },
[python](error) is not in list 배열 값 중 index를 알아오기 위해 index 함수 사용 시 ValueError: 값 is not in list 에러 발생 해당 에러는 리스트 안에 '값이 없을 때 발생 하기 코드 실행 시 'ValueError: 5 is not in list' 에러 발생 arrVal = [1, 2, 3, 4] print(arrVal.index(5) 예외처리 try : idx = arr.index(val) except ValueError : print("ValueError")
[python] python web crawling 참고 사이트 https://wikidocs.net/85381 0. 머리말 2022년 1월, 비전공자를 위한 파이썬 자동화 완벽 가이드 원고 작업을 시작합니다. wikidocs.net
[python] BeautifulSoup 파이썬을 이용한 웹 크롤링 시 데이터 추출하기 위한 함수 requests 설치 pip install requests BeautifulSoup 설치 pip install beautifulsoup4 파이썬에서 기본 내장함수가 아니라서 import 필요 import requests from bs4 import eautifulSoup 사용법 import requests from bs4 import BeautifulSoup url = 'https://naver.com' res = requests.get(url) if res.status_code == 200: html = res.text soup = BeautifulSoup(html, 'html.parser') print(soup) else : print(res...