Open JohnWarren1 opened 6 years ago
below was run in python console to successfully pull an image down. Would require some changes to randomise which image is found, and check image hasn't been taken already:
img_data = requests.get(r['hits'][1]['webformatURL']).content with open('image_name.jpg', 'wb') as handler: handler.write(img_data)
custom command run by a cron job seems to be top recommendation