lint, not full

This commit is contained in:
Sergio Álvarez 2017-12-13 12:37:31 +01:00
parent 1affbdd7a2
commit c48c57f7f0
11 changed files with 360 additions and 343 deletions

View File

@ -1,7 +1,9 @@
#! /usr/bin/python3 #! /usr/bin/python3
"""
Affixes Cron
"""
import datetime import datetime
import time
import webhook import webhook
import conf import conf
@ -15,4 +17,3 @@ for s in conf.affix_rotation[week]:
wh.add_embed(webhook.embed(color=0x3f89ff, fields=f)) wh.add_embed(webhook.embed(color=0x3f89ff, fields=f))
wh.send("**[Affixes de esta semana](<https://mythicpl.us/>)**") wh.send("**[Affixes de esta semana](<https://mythicpl.us/>)**")
time.sleep(2)

View File

@ -1,3 +1,6 @@
"""
config module
"""
from tokens import * from tokens import *

View File

@ -1,9 +1,9 @@
#! /usr/bin/python3 #! /usr/bin/python3
import redis
import time import time
import requests
import sys import sys
import redis
import requests
import webhook import webhook
import conf import conf

View File

@ -1,11 +1,14 @@
#! /usr/bin/python3 #! /usr/bin/python3
"""
Loot notifications
"""
import redis
import time import time
import json import json
import requests
import traceback import traceback
import os import os
import redis
import requests
import webhook import webhook
import conf import conf

View File

@ -1,4 +1,7 @@
#! /usr/bin/python3 #! /usr/bin/python3
"""
Raider.IO progress
"""
import redis import redis
import requests import requests

9
rss.py
View File

@ -1,9 +1,12 @@
#! /usr/bin/python3 #! /usr/bin/python3
"""
RSS news
"""
import feedparser
import redis
import time import time
import traceback import traceback
import feedparser
import redis
import webhook import webhook
import conf import conf
@ -26,7 +29,7 @@ for url in url_feeds:
if "items" not in feed or len(feed["items"]) < 3: if "items" not in feed or len(feed["items"]) < 3:
continue continue
for i in [0, 1, 2]: # 3 últimas noticias for i in [0, 1, 2]: # last 3 news
entry = feed["items"][i] entry = feed["items"][i]
fid = "{} {}".format(feed["feed"]["title"][0:20], entry["published"]) fid = "{} {}".format(feed["feed"]["title"][0:20], entry["published"])
if r.zadd("bot:rss", now, fid) == 0: if r.zadd("bot:rss", now, fid) == 0:

View File

@ -1,9 +1,12 @@
#! /usr/bin/python3 #! /usr/bin/python3
"""
Streams Cron
"""
import redis
import time import time
import requests
import sys import sys
import redis
import requests
import webhook import webhook
import conf import conf

View File

@ -1,11 +1,14 @@
#! /usr/bin/python3 #! /usr/bin/python3
"""
WarcrafLogs notifications
"""
import redis
import time import time
import sys
import redis
import requests import requests
import webhook import webhook
import conf import conf
import sys
now = time.time() now = time.time()

View File

@ -1,7 +1,6 @@
#! /usr/bin/python3 #! /usr/bin/python3
import redis import redis
import time
import requests import requests
import webhook import webhook
import conf import conf
@ -37,4 +36,3 @@ if rank is not None and "realm_rank" in rank:
if msg: if msg:
wh.send(msg) wh.send(msg)
time.sleep(2)