Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 2.5 KB

How_to_Raspberry.md

File metadata and controls

58 lines (43 loc) · 2.5 KB

How to run InstaPy on a RaspberryPi

  1. connect rpi3 to monitor via HDMI
  2. connect internet via cat5
  3. insert usb for wireless keyboard and mouse
  4. plug in rpi3 with sd card preloaded with NOOBs
  5. select country & install Raspbian
  6. open terminal --> sudo raspi-config -->interfacing options --> SSH -->enable (allows ssh connection from MacBook); then navigate to VNC --> enable (allows GUI access)
  7. sudo apt-get update && sudo apt-get upgrade
  8. mkdir Projects
  9. cd Projects
  10. git clone https://github.com/timgrossmann/InstaPy.git
  11. cd InstaPy
  12. sudo pip install . (encountered some errors and resulting 3 commands below (13-15), all may not be necessary)
  13. sudo apt-get build-dep python-imaging
  14. sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
  15. sudo pip install .
  16. sudo apt-get install tightvncserver (to view GUI from MacBook)

Remove any versions of Firefox as it will conflict with the correct one installed below:

  1. sudo apt-get remove firefox-esr
  2. sudo apt-get remove iceweasel
  3. sudo apt-get remove firefox

found the following commands to install Firefox here; https://www.q4os.org/forum/viewtopic.php?id=912

  1. echo 'deb http://q4os.org/qextrepo q4os-rpi-firefox-cn main' | sudo tee /etc/apt/sources.list.d/qextrepo.list
  2. wget -nv -O- http://q4os.org/qextrepo/q4a-q4os.gpg.pub | sudo apt-key add -
  3. sudo apt-get update
  4. sudo apt-get install firefox

Update GeckoDriver if needed. Instructions at the end of this document.

Encountered some errors when trying to run the quickstart.py and ran the next 3 commands (all may not be necessary)

  1. sudo pip install future
  2. sudo apt-get install xvfb
  3. sudo pip install pyvirtualdisplay
  4. sudo reboot (may not be required, but no harm)

Assuming you've modified quickstart.py to your liking and added your Instagram login to instapy.py

  1. sudo xvfb-run python quickstart.py

I installed TMUX to help run this headless, so that I can disconnect from the session and have the program continue to run on the rpi3

  1. sudo apt-get install tmux (more info found here: https://github.com/tmux/tmux)

  2. follow the example seen in examples\firefoxExample.py to set the default browser as Firefox

How to update GeckoDriver on Raspbian

New releases can be found in https://github.com/mozilla/geckodriver/releases

  1. wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-arm7hf.tar.gz
  2. tar -xvzf geckodriver-v*
  3. chmod +x geckodriver
  4. sudo cp geckodriver /usr/local/bin/