ArchiveTeam / NewsGrabber

Grabbing all news.
62 stars 32 forks source link

Do not crash on bad Python service files #40

Open Arkiver2 opened 8 years ago

Arkiver2 commented 8 years ago

When a bad Python file is found a message should be printed in the IRC channel to let admins know which Python file should be manually fixed.

Arkiver2 commented 8 years ago

Examples of bad Python service files:

refresh = 7
version = 20160125.01

urls = ['http://www.ibtimes.com.au',
        'http://cn.ibtimes.com',
        'http://www.ibtimes.co.in',
        'http://it.ibtimes.com',
        'http://jp.ibtimes.com',
        'http://www.ibtimes.co.uk',
        'http://www.ibtimes.com']
regex = [r'^https?:\/\/[^\/]*ibtimes/.co\/]
videoregex = []
liveregex = []
refresh = 4
version = 20160125.01

urls = ['http://www.ft.com/rss/home/asia',
        'http://www.ft.com/rss/home/europe',
        'http://www.ft.com/rss/home/india',
        'http://www.ft.com/rss/home/middleeast',
        'http://www.ft.com/rss/home/uk',
        'http://www.ft.com/rss/home/us']
regex = [r'^https?:\/\/[^\/]*ft\.com\/']
videoregex = []r'^https?:\/\/[^\/]*video\.ft\.com\/']
liveregex = []
Arkiver2 commented 8 years ago

The messages warning for a bad Python service file should be printed to both the discussion channel and the bot channel, because of the importance of the fix that should be made. Without the fix the bot can't update the Python service files it has loaded.