Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am parkersaint on github.
  • I am parkersaint (https://keybase.io/parkersaint) on keybase.
  • I have a public key ASChNCH7hj3s8V1gtUXHWXUrFX1blB_Y9XH9Wp1zLtnJjgo

To claim this, I am signing this object:

@ParkerSaint
ParkerSaint / image-scraper.py
Created January 27, 2019 03:08
URL Scraper (?) | I use this to download images from sites that have a "random image" feature, but the image directory is forbidden (403). It is easy to find the array of images if you look in the JS file of a website.
import requests
import shutil
import os
log = open("log.txt","a+")
l = input('enter array without brackets (example: "item1","item2","item3"): ')
root = input('enter root url (example: https://example.com/example): ')
path = input('enter the path of the directory to save the files in (example: /path/to/file/): ')
l = l.replace('"', '').split(",")