Skip to content

matheusvanzan/broken-links-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Monitor broken links and open github issues

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages