이미지 크롤링(python, google_images_download)
이전글(html크롤링--> https://sh1256.tistory.com/52?category=991734 )
1. google_images_download 다운 --> https://pypi.org/project/google_images_download/
google_images_download
Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code!
pypi.org
터미널에 붙여넣기 (ctrl+shift+v)
그러면 설치된다.
홈페이지에 있는 documentation에서 예제를 실행해보자.
Code sample - Importing the library
소스코드를 실행해보자. (google.py파일을 따로 만들어서 실행해 봄)
터미널에 "python google.py" 입력
그러면 왼쪽에 downloads 라는 파일이 하나 생성된다.
소스코드에서 봤던 키워드들이 각각의 파일로 저장되어 있다.
각각의 파일 안에는 키워드와 관련된 사진들이 20장씩 저장되어 있다.
(그래야 하는데 무슨 일인지.. 오류가 뜬다..ㅠㅜ)
파이썬 구글 이미지 크롤링(uh oh! keywords is a required argument, unfortunately all 20 could not be downloaded becaus
pypi.org/project/google_images_download/ google_images_download Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code! pypi.org 예시) from google_images_downlo..
skmouse.tistory.com