-
Notifications
You must be signed in to change notification settings - Fork 5
/
mycrawlerrun.sh
41 lines (38 loc) · 1.54 KB
/
mycrawlerrun.sh
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
40
41
#!/bin/bash
cd ~/findbiz/myCrawler2018-master
# source bin/activate
# source venv.sh
pip install -r requirements.txt
pwd
python --version
pip --version
python3 --version
pip3 --version
# echo "請輸入關鍵字(中文地區名):"
# read mykeyword
echo "請輸入城市名(例如:臺北市 或 ALL):"
read mykeywordcity
echo "請輸入地區名(例如:內湖區 或 若城市為 ALL,則在此輸入完整城市+地區+路名):"
read mykeywordcityarea
echo "請輸入開始頁數(數字,最少請輸入 1):"
read mypagestart
echo "請輸入結束頁數(數字,0 為全部):"
read mypagestop
echo "資料種類有5種,輸入方式為5個位元,例:10000"
echo "分別為「公司」、「分公司」、「商業」、「工廠」、「有限合夥」"
echo "若欲查詢的資料種類為「公司」,請輸入:10000"
echo "若欲查詢的資料種類為「商業」,請輸入:00100"
echo "若欲查詢的資料種類為「公司」或「商業」,請輸入:10100"
echo "以上,如此類推"
echo "請輸入資料種類(5個位元,例:10000):"
read mydatatype
echo "Please wait..."
# pip install selenium
# pip install openpyxl
# python myselenium2.py 台中市北區 1 1 10000 0
# Quick Tip: caffeinate your Terminal - BrettTerpstra.com - https://goo.gl/sXvwRh
# caffeinate -i python3 myselenium2.py $mykeyword $mypagestart $mypagestop $mydatatype 0 1
caffeinate -i python3 myselenium2starter.py $mykeywordcity $mykeywordcityarea $mypagestart $mypagestop $mydatatype 0 1
open ~/findbiz/myCrawler2018-master/data/
exit
# deactivate