|
|
|
@ -9,22 +9,37 @@ function usage { |
|
|
|
OPTIONS: |
|
|
|
OPTIONS: |
|
|
|
-h --help -? print usage |
|
|
|
-h --help -? print usage |
|
|
|
--events File in JSON format that contains an array |
|
|
|
--events File in JSON format that contains an array |
|
|
|
of prevously parsed events. |
|
|
|
of prevously parsed events. This option |
|
|
|
|
|
|
|
will disable image scraping of previously |
|
|
|
|
|
|
|
scraped events. |
|
|
|
-p --page Facebook page id. Scrape all events of a |
|
|
|
-p --page Facebook page id. Scrape all events of a |
|
|
|
specific facebook page. |
|
|
|
specific facebook page. |
|
|
|
--pages List of Facebook page ids. See examples for |
|
|
|
--pages List of Facebook page ids. See examples for |
|
|
|
format. |
|
|
|
format. |
|
|
|
-o --output Output events into this path instead of |
|
|
|
-o --output Output events into this path instead of |
|
|
|
stdout. |
|
|
|
stdout. |
|
|
|
-i --images Scrape event images (experimental) |
|
|
|
-i --images (experimental) Scrape event images. |
|
|
|
--image-directory Default: './img'. Set directory for saving |
|
|
|
--image-directory Default: './img'. Set directory for saving |
|
|
|
event images. |
|
|
|
event images. |
|
|
|
|
|
|
|
--skip-upcoming-events Default: The scraper will automatically |
|
|
|
|
|
|
|
scrape upcoming events, with this option |
|
|
|
|
|
|
|
enabled they will be skipped. |
|
|
|
|
|
|
|
--past-events (experimental) Default: The scraper will not scrape past |
|
|
|
|
|
|
|
events by default. Enabling this option |
|
|
|
|
|
|
|
makes the scraper include past events. |
|
|
|
|
|
|
|
Please note that this might take a while |
|
|
|
|
|
|
|
depending on the number of past events. |
|
|
|
NOTE: |
|
|
|
NOTE: |
|
|
|
Events and pages needs to be public. Private events or pages are not yet |
|
|
|
Events and pages needs to be public. Private events or pages are not yet |
|
|
|
supported. |
|
|
|
supported. |
|
|
|
|
|
|
|
|
|
|
|
EXAMPLES: |
|
|
|
EXAMPLES: |
|
|
|
|
|
|
|
# Select files with options |
|
|
|
./scrape.sh -p livesentralen -o events.json --events=events.json |
|
|
|
./scrape.sh -p livesentralen -o events.json --events=events.json |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# You can redirect standard output into a file |
|
|
|
|
|
|
|
./scrape.sh --pages="livesentralen,tyventrondheim" > events.json |
|
|
|
|
|
|
|
|
|
|
|
EOF |
|
|
|
EOF |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|