Difference between revisions of "Pyhon: Facebook Page Crawler"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 16: | Line 16: | ||
Menjalankan | Menjalankan | ||
| − | |||
cd /usr/local/src/Facebook-Page-Crawler-master | cd /usr/local/src/Facebook-Page-Crawler-master | ||
python Facebook_Page_Crawler.py | python Facebook_Page_Crawler.py | ||
| + | |||
| + | usage: Facebook_Page_Crawler.py [-h] [-r REACTIONS] [-s STREAM] | ||
| + | target since until | ||
| + | |||
| + | positional arguments: | ||
| + | target Set the target fans page(at least one) you want to | ||
| + | crawling. Ex: 'appledaily.tw' or 'appledaily.tw, | ||
| + | ETtoday' | ||
| + | since Set the start date you want to crawling. Format: | ||
| + | 'yyyy-mm-dd HH:MM:SS' | ||
| + | until Set the end date you want to crawling. Format: 'yyyy- | ||
| + | mm-dd HH:MM:SS' | ||
| + | |||
| + | optional arguments: | ||
| + | -h, --help show this help message and exit | ||
| + | -r REACTIONS, --reactions REACTIONS | ||
| + | Collect reactions or not. Default is no. | ||
| + | -s STREAM, --stream STREAM | ||
| + | If yes, this crawler will turn to streaming mode. | ||
| + | |||
| + | |||
| + | |||
| + | Contoh | ||
| + | |||
| + | python Facebook_Page_Crawler.py 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' | ||
| + | python Facebook_Page_Crawler.py 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' -r yes | ||
| + | python Facebook_Page_Crawler.py 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' -s yes | ||
| + | python Facebook_Page_Crawler.py 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' -r yes -s yes | ||
| + | python Facebook_Page_Crawler.py 'appledaily.tw,ETtoday' '2016-09-01 00:00:00' '2016-09-01 23:59:59' | ||
| + | |||
| + | |||
| + | About token | ||
| + | |||
| + | * This crawler use app_id, app_secret to get the token. | ||
| + | * Replace app_id, app_secret to use your own app setting | ||
==Referensi== | ==Referensi== | ||
* https://github.com/chenjr0719/Facebook-Page-Crawler | * https://github.com/chenjr0719/Facebook-Page-Crawler | ||
Latest revision as of 14:03, 15 August 2017
sumber: https://github.com/chenjr0719/Facebook-Page-Crawler
Download
https://github.com/chenjr0719/Facebook-Page-Crawler.git
Siapkan
pip install requests cd /usr/local/src wget https://github.com/chenjr0719/Facebook-Page-Crawler/archive/master.zip unzip master.zip cd /usr/local/src/Facebook-Page-Crawler-master
Menjalankan
cd /usr/local/src/Facebook-Page-Crawler-master python Facebook_Page_Crawler.py
usage: Facebook_Page_Crawler.py [-h] [-r REACTIONS] [-s STREAM]
target since until
positional arguments:
target Set the target fans page(at least one) you want to
crawling. Ex: 'appledaily.tw' or 'appledaily.tw,
ETtoday'
since Set the start date you want to crawling. Format:
'yyyy-mm-dd HH:MM:SS'
until Set the end date you want to crawling. Format: 'yyyy-
mm-dd HH:MM:SS'
optional arguments:
-h, --help show this help message and exit
-r REACTIONS, --reactions REACTIONS
Collect reactions or not. Default is no.
-s STREAM, --stream STREAM
If yes, this crawler will turn to streaming mode.
Contoh
python Facebook_Page_Crawler.py 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' python Facebook_Page_Crawler.py 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' -r yes python Facebook_Page_Crawler.py 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' -s yes python Facebook_Page_Crawler.py 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' -r yes -s yes python Facebook_Page_Crawler.py 'appledaily.tw,ETtoday' '2016-09-01 00:00:00' '2016-09-01 23:59:59'
About token
- This crawler use app_id, app_secret to get the token.
- Replace app_id, app_secret to use your own app setting