facebook runner
This commit is contained in:
parent
5c3128cfef
commit
ef352b6030
21
runner_facebook.sh
Executable file
21
runner_facebook.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
OLD=$PWD
|
||||||
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
if [ -d "/usr/local/crawler-venv" ]
|
||||||
|
then
|
||||||
|
source /usr/local/crawler-venv/bin/activate
|
||||||
|
fi
|
||||||
|
|
||||||
|
FOLDER=$(date +"%Y-%m")
|
||||||
|
mkdir -p "$OLD/$FOLDER"
|
||||||
|
|
||||||
|
DAY=$(date +"%d")
|
||||||
|
mkdir -p "$OLD/$FOLDER/$DAY/facebook"
|
||||||
|
|
||||||
|
TIME=$(date +"%s")
|
||||||
|
|
||||||
|
source ~/.secrets
|
||||||
|
|
||||||
|
scrapy crawl events -a email="$FACEBOOK_EMAIL" -a password="$FACEBOOK_PASSWORD" -a page="$1" -o "$OLD/$FOLDER/$DAY/facebook/$TIME_$1.csv"
|
Loading…
Reference in New Issue
Block a user