Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1.32 KB

README.md

File metadata and controls

53 lines (40 loc) · 1.32 KB

Broken links monitor

This project parses a website to find broken links. If one is found it creates an issue at specified github repository.

Further instructions can be found in Portuguese-BR here

Install

pip install -r requirements.txt

Configuring urls

The urls can be configured in data.py file.

urls_to_check = [
    {
        'channel': 'https://hooks.slack.com/services/first-hook',
        'urls': [
            'https://example.com/',
            'https://example.com/url-one/',
            'https://example.com/url-two/'
        ]
    },
    {
        'channel': 'https://hooks.slack.com/services/second-hook',
        'urls': [
            'https://other.com/',
            'https://other.com/url-one/'
        ]
    },
    ...
]

Configuring Slack issue

Cretate an incoming webhook on Slack here

Just get the provided Url and put in data.py

Crontab config

Add the following line to your crontab with crontab -e to run the script every day at 6 a.m.

# m h dom mon dow command
0 6 * * * /path/to/virtualenv/bin/python main.py