# -*- coding: utf-8 -*- import requests import re import os from PIL import Image as resizer API_URL = "https://www.googleapis.com/customsearch/v1?key=[APIKEY] &cx=[ENGINE] &q=%s &searchType=image &start=%s" def getImageFromCustomAPI(start, end, word, kind): for i in range(start, end, 10): print(API_URL % (word, str(i))) response = requests.get(API_URL % (word + ",正面", str(i))) for j in range(len(