Skip to content

install

anoduck edited this page Jul 24, 2021 · 5 revisions

Installing and Running the script during development

  1. The following instructions assume the user is running a Linux or Unix derivative with the Python programming language and all of it's accoutrements already installed.

  2. Perform a shallow clone of the repo, like a boss!

 git clone https://www.github.com/anoduck/UFS-Quackified.git
  1. Ensure you have geckodriver installed and that it is in /usr/local/bin/geckodriver OR within $PATH. If not, you will have to open the script itself and modify this. This will soon be moved as an editable variable in a configuration file.

  2. Install all the necessary requirements from the requirements.txt file.

sudo pip3 install -r requirements.txt

(If you discover there is a requirement not mentioned in the requirements.txt, please open an issue on github.)

OR

(RECOMMENDED) - Facilitate the use of the generated Pipfile with pipenv to generate a virtual environment for the script and download the required dependencies.

pipenv install
  1. Change Directory to the scraper folder inside of the repo you just cloned, this directory will serve as the working directory for the project.

  2. copy ../input.txt.example to input.txt and copy ../credentials.yml.example to credentials.yml. Then open up those files making desired changes with your preferred text editor, represented below as $EDITOR.

Note on input.txt: What goes in this file is solely the username of a profile you would like to scrape, one username per line, of course. Do not include an url or the actual name of the profile, you will get an error that way.

cd path/to/cloned/repo/UFS-Quackified
cp input.txt.example scraper/input.txt
cp credentials.yml.example scraper/credentials.yml
cd scraper
$EDITOR input.txt
# Insert usernames to scrape then
$EDITOR credentials.yml
# Enter credential information
  1. Run the photo scraper.
python3 photo-scraper.py
  1. Watch it scrape away for a few, then I suggest you move to another workspace and forget about it for quite sometime. The process of actually scraping profiles takes a long time due to the ratelimitations The Book of Face places on the website. If you are unfamiliar in working with rate limitations, editing the script in order for it to run faster will undoubtedly result in the scraping process being prevented from completion and more severe your profile will be banned temporarily. This can be quite irritating.

  2. The script will scrape all photos from the user profiles listed in the input.txt file, AND then will scrape all the photos from all the friends of the user profiles listed in the input.txt file who are of the desired gender. The desired gender can be set in the script to "Male", "Female", and "All". This process takes a significant amount of time, due to many users literally will upload anything and everything to their accounts.

  3. If for some reason you discover that your profile has been blocked for using this script or a feature on the book of face has been disabled preventing you from successfully completing the scrape. Please submit a new issue to this repository so that we may make concessions and corrections to prevent this from further occurring again.

  4. Don't ever tell anyone that you scraped a book of face profile, they will think this is really creepy, and a friendship ending awkwardness is guaranteed to ensue. Be warned!

Clone this wiki locally