python 설치와 vscode 등 에디터 설치 관련 정보는 포함되어 있지 않습니다.
매번 버전이 변경되다 보니 애드인이 정상동작하는 경우도 있고 아닌 경우도 있습니다. 예전에는 google_images_download를 통해 다운로드가 가능했으나, 이젠 동작하지 않는 분들은 다음과 같이 진행하면 됩니다.
먼저 이전에 google_images_download 를 설치했다면 해당 코드를 제거 해야 합니다. 제거 코드는 다음과 같습니다.
pip uninstall google_images_download
기존에 설치 된 코드가 없다면 다음 코드로 바로 설치하면 됩니다.
pip install git+http://github.com/joeclinton1/google-images-download.git
github.com/Joeclinton1/google-images-download
Joeclinton1/google-images-download
Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code! - Joeclinton1/google-images-download
github.com
해당 코드를 설치 했다면 이제 이미지를 다운로드 가능합니다.
파이썬 코드에 해당 내용을 붙여놓고 코드를 동작하면 다운로드 폴더에 추가 폴더가 각각의 키워드로 생성되며 다운로드가 시작 됩니다.
해당 코드는 하단 링크에서 제공하는 코드 입니다.
google-images-download.readthedocs.io/en/latest/examples.html#
Examples — Google Images Download documentation
Examples Link to GitHub repo Link to Documentation Homepage Link to Input arguments or parameters Config File Format You can either pass the arguments directly from the command as in the examples below or you can pass it through a config file. Below is a s
google-images-download.readthedocs.io
VScode 에서 다음과 같이 입력하면 됩니다.
from google_images_download import google_images_download #importing the library
response = google_images_download.googleimagesdownload() #class instantiation
arguments = {"keywords":"Polar bears,baloons,Beaches","limit":20,"print_urls":True} #creating list of arguments
paths = response.download(arguments) #passing the arguments to the function
print(paths) #printing absolute paths of the downloaded images
여기서 수정하며 받을 수 있는 내용은 다음 코드 입니다. 3개의 키워드를 20개씩 받도록 설정 되어 있습니다. 이미지가 많이 필요한 경우에는 limit 갯수를 변경하면 됩니다.
arguments = {"keywords":"Polar bears,baloons,Beaches","limit":20,"print_urls":True}
'RPA 툴 사용법' 카테고리의 다른 글
[ Appium ] adb 시 unauthorized 오류 (0) | 2021.01.08 |
---|---|
[ Android ] 안드로이드 화면 USB로 미러링 하여 사용하기 (0) | 2020.12.28 |
[ Appium ] 설치 / 세팅 하기 - Step3 - Android Studio (0) | 2020.12.02 |
[ Appium ] 설치 / 세팅 하기 - Step4 - Appium 설치 (0) | 2020.12.01 |
[ Appium ] 설치 / 세팅 하기 - Step2 Node js (0) | 2020.12.01 |