run_spider.sh
1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/zsh
# chunk @ 2014
########################################################################################
##
## F**k World!
##
## 90% of efforts wasted on anti-anti-scrapping !!!
##
########################################################################################
##############################################
## environment variables
##############################################
export export TERM=linux
source /home/hadoop/.zshrc
v env0
##############################################
## additional files list
##############################################
FILE=hehe.json
##############################################
## requirements:
## pip install selenium
## pip install scrapy-random-useragent
## pip install https://github.com/sosign/scrapy-webdriver/archive/master.zip
##
##############################################
#scrapy runspider spider/test.py
cd ./spider/mspider/
[ -f $FILE ] && rm $FILE
#scrapy crawl douban -o $FILE
#scrapy crawl baidu -o $FILE
scrapy crawl larvae