Skip to content

Instantly share code, notes, and snippets.

@peregrinogris
Last active December 15, 2015 02:39
Show Gist options
  • Save peregrinogris/5188954 to your computer and use it in GitHub Desktop.
Save peregrinogris/5188954 to your computer and use it in GitHub Desktop.

Installing Scrapy

sudo apt-get install libxml2-dev libxslt-dev
pip install scrapy
pip install python-dateutil

Running Scrapy

When running scrapy, this bash script is handy:

#!/bin/bash
export DB_PATH=/vagrant/server/db
export PYTHONPATH=/vagrant/server
scrapy crawl ${1:-zvents}

save it as 'run' inside the crawlers and run it as ./run Here, bear in mind that:

  • DB_PATH: Absolute Path to the database directory
  • PYTHONPATH: Absolute Path to the project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment