Motivated by laziness, I wrote a scraper that will download all album covers on the frontpage of r/fakealbumcovers
Blog post explaining my process writing this little scraper.
Requires Node v7.6 or above
- Clone the repo
$ git clone https://github.com/aos/alcoves.git
- Install dependencies
$ npm install
- Change the download path by setting
IMAGE_DIRECTORYwith a relative path to your desired location
const IMAGE_DIRECTORY = '../../Pictures/covers'- Run either using
npm startornode index.js
The image is stored on Docker Hub. You can run it with the following command:
$ docker run --cap-add=SYS_ADMIN -v ~/Desktop/imgs:/app/images --rm aosd/alcoves
Note: The images are downloaded into /app/images inside the container (can
be changed in index.js), so you will need to mount the appropriate folder
to download the images locally. In the example above, I've mounted the
~/Desktop/imgs folder.
(--cap-add=SYS_ADMIN is needed when running locally because the Dockerfile
uses a non-privileged user which may not have all necessary privileges.)
If you want to build it locally, follow these steps:
- Clone the repo
- Build image
$ docker build -t alcoves .
- Run image
$ docker run --cap-add=SYS_ADMIN -v ~/Desktop/imgs:/app/images --rm alcoves