Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@johnjreiser
Created June 12, 2019 16:04
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save johnjreiser/b4e46c06dfb28e3034c3f78c819b4c3f to your computer and use it in GitHub Desktop.
Save johnjreiser/b4e46c06dfb28e3034c3f78c819b4c3f to your computer and use it in GitHub Desktop.
Download Fake People - quick script to grab images from This Person Does Not Exist
#!/bin/bash
MAX=10
if [[ ! -z "$1" ]]; then
MAX=$1
fi
for i in $( seq $MAX ); do
FILE=image${i}.jpg
curl 'https://thispersondoesnotexist.com/image' -H 'authority: thispersondoesnotexist.com' -H 'pragma: no-cache' -H 'cache-control: no-cache' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3' -H 'referer: https://thispersondoesnotexist.com/' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.9' --compressed -o $FILE
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment