项目作者: mratkovic

项目描述 :
njuskalo.hr scrapper that alerts when new ads matching given filters appear
高级语言: Python
项目地址: git://github.com/mratkovic/njuskalo-notifier.git
创建时间: 2017-10-27T12:05:27Z
项目社区:https://github.com/mratkovic/njuskalo-notifier

开源协议:MIT License

下载


njuskalo-notifier

njuskalo.hr scraper that alerts when new ads matching given filters appear

Install:

  1. pip3 install -r requirements.txt
  2. python3 setup.py install

Usage:

$ njuskalo-notifier --help

  1. usage: njuskalo-notifier [-h] [-c CONFIG]
  2. optional arguments:
  3. -h, --help show this help message and exit
  4. -c CONFIG, --config CONFIG
  5. path to config file

Specify in config_example.ini URLs you want to parse, email settings, pipelines…

To disable email notifications simply comment out line sniffer_scraper.pipeline.EmailPipeline = 400
By default SQLite database ads_dump.db is created with all parsed information.

Single run

njuskalo-notifier -c config_example.ini

Schedule

Scheduled run can be achieved using bash command cron.

Run crontab -e and add something like:

  1. # m h dom mon dow command
  2. 0 9,19 * * * /usr/local/bin/njuskalo-notifier -c path-config/config_example.ini >> log_output_dir/njuskalo.log 2>&1

Note:

Not tested on Windows - possible additional dependencies required. Should work using WSL (Windows Subsystem for Linux)