PYTHON 오류해결 django-admin.py : 'django-admin.py' 용어가 cmdlet, 함수, 스크립트 파일 또는 실행할 수 있는 프로그램 이름으로 인식되지 않습니다 해결방안 1) 파이썬 설치경로를 PC 환경변수에 등록 C:\Users\사용자명\AppData\Local\Programs\Python\Python38 해결방안 2) Python packages에서 Django 설치여부 확인 해결방안 3) 파이썬 재설치 참고 블로그 https://sun-kakao.tistory.com/92 Python 컴파일 시도 시 발생하는 '용어가 cmdlet, 함수, 스크립트 파일 또는 실행할 수 있는....' 해결 오류 내용) 용어가 cmdlet, 함수, 스크립트 파일 또는 실 행할 수 있는 프로그램..
### wiki에서 데이터를 검색해서 MySQL DB에 저장하는 코드(무한루프) from urllib.request import urlopen from bs4 import BeautifulSoup import datetime import random import pymysql import re conn = pymysql.connect(host='127.0.0.1', user='root', passwd='your password', db='mysql', charset='utf8') cur = conn.cursor() cur.execute("USE scraping") random.seed(datetime.datetime.now()) def store(title, content): cur.execute( 'I..
순서 (1) MySQL 설치 (2) Python 라이브러리 설치 (3) Python 코드 작성 및 연결 테스트 (1) MySQL 설치 아래 URL 접속 후 다운로드 및 설치(Server Only 옵션으로 설치) https://dev.mysql.com/downloads/windows/installer/ MySQL :: Download MySQL Installer Select Operating System: Select Operating System… Microsoft Windows Select OS Version: All Windows (x86, 32-bit) Windows (x86, 32-bit), MSI Installer 8.0.25 2.4M (mysql-installer-web-community-8...
[Python] 파이썬으로 MySQL DB 연결 후 데이터 출력하는 코드 mysql root 계정 패스워드는 본인의 패스워드로 바꿔서 실행 ### MySQL 으로 DB 연결 후 데이터 출력~!! import pymysql conn = pymysql.connect(host='127.0.0.1', user='root', passwd='your password', db='mysql') cur = conn.cursor() cur.execute("USE scraping") cur.execute("SELECT * FROM pages WHERE id=1") print(cur.fetchone()) cur.close() conn.close()
### test.csv 파일을 생성 후 데이터를 저장하는 코드 import csv csvFile = open('test.csv', 'w+') try: writer = csv.writer(csvFile) writer.writerow(('number', 'number plus 2', 'number plus 3')) for i in range(5): writer.writerow( (i, i+2, i+3)) finally: csvFile.close()
pytesseract를 사용하여, 이미지의 text 출력 code: from PIL import Image import pytesseract pytesseract.pytesseract.tesseract_cmd = 'C:/Program Files/Tesseract-OCR/tesseract.exe' print(pytesseract.image_to_string(Image.open('./test.png'))) output: I watch three climb before it’s my turn.[lit’s a tough one.|ilithe guy before me tries twice.[ll He falls tuice.[lAfter the last one, he cones down,lie’s finished ..
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information. 파이썬 pytesseract 에러 발생 시(1) On Windows download binary from https://github.com/UB-Mannheim/tesseract/wiki. then add pytesseract.pytesseract.tesseract_cmd = 'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe' to your script. Then you should install python pack..
[파이썬 소스코드] URL 웹페이지 스크린 샷 ### URL 스크린 샷 from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument('headless') driver = webdriver.Chrome(options=options) driver.get('http://www.naver.com/') driver.get_screenshot_as_file('./naver_main.png')
크롬 버전 확인하는 방법 크롬 브라우저에서 chrome://version/ 입력 후 확인 할 수 있습니다. [Python] 크롬 버전에 맞는 드라이버 다운로드 및 크롬 버전확인 https://sites.google.com/a/chromium.org/chromedriver/downloads Downloads - ChromeDriver - WebDriver for Chrome WebDriver for Chrome sites.google.com 출처: https://beomi.github.io/2017/09/28/HowToMakeWebCrawler-Headless-Chrome/ 나만의 웹 크롤러 만들기(7): 창없는 크롬으로 크롤링하기 - Beomi's Tech blog 2017-09-28 나만의 웹 크롤러 ..
- Total
- Today
- Yesterday
- 파이썬개발환경
- 해킹
- 보안
- 악성코드
- 멀웨어
- hacking
- 웹크롤링
- 파이썬웹크롤러
- 브라우저실행
- emailhacking
- zerosecu
- 악성코드분석도구
- 바이러스토탈 사용법
- malware
- 오류해결
- 바이러스
- python
- 파이썬
- 보안기술정보
- python3
- maware
- URL열기
- 바이러스토탈
- 분석도구
- Security
- virus
- 악성메일분석
- 웹크롤링기초
- zerosecurity
- 악성코드분석
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |