Initial commit
This commit is contained in:
2
.conf.example
Normal file
2
.conf.example
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
chat id = 0123456789
|
||||||
|
bot token = 9876543210:ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.conf
|
3
ql
Normal file
3
ql
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Example Quest Name
|
||||||
|
Example Tamer Name|Example Tamer Quest Name
|
||||||
|
Example Tamer Name|Example Tamer Quest Name|Example Pet Type
|
83
readme.md
Normal file
83
readme.md
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
```
|
||||||
|
cp .conf.example .conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Enter chat ID on line 1, bot token on line 2.
|
||||||
|
|
||||||
|
Add the quests you want to track in `ql`. One quest per line.
|
||||||
|
|
||||||
|
You can give it a different name by prepending it with `<name>|`. This is mostly useful for Pet Tamer/Legendary Pet names.
|
||||||
|
You can also append it with `|<string>` to pass through any reminder to the notification message.
|
||||||
|
|
||||||
|
# Master Tamer/Pet lists
|
||||||
|
|
||||||
|
These lists are useful for the "beat <number> Tamers/Pets with all <type> pets" achievements. (eg Aquatic Acquiescence)
|
||||||
|
You can add `|<type>` to the end so the bot sends you a reminder of what type you are currently on.
|
||||||
|
|
||||||
|
For example if I'm working on doing the aquatic achievement I can use:
|
||||||
|
|
||||||
|
```
|
||||||
|
Nightwatcher Merayl|Training with the Nightwatchers|aquatic
|
||||||
|
```
|
||||||
|
|
||||||
|
Once I've done this trainer with aquatic pets I simply change the type to the next one I want to do.
|
||||||
|
|
||||||
|
## Broken Isles Master Tamers
|
||||||
|
|
||||||
|
```
|
||||||
|
Nightwatcher Merayl|Training with the Nightwatchers
|
||||||
|
Tiffany Nelson|Fight Night: Tiffany Nelson
|
||||||
|
Sir Galveston|Fight Night: Sir Galveston
|
||||||
|
Grixis Tinypop|Tiny Poacher, Tiny Animals
|
||||||
|
Robert Craig|My Beasts's Bidding
|
||||||
|
Aulier|The Master of Pets
|
||||||
|
Varenne|Chopped
|
||||||
|
Xorvasc|Dealing with Satyrs
|
||||||
|
Bodhi Sunwayver|Fight Night: Bodhi Sunwayver
|
||||||
|
Amalia|Fight Night: Amalia
|
||||||
|
Bredda Tenderhide|Training with Bredda
|
||||||
|
Odrogg|Snail Fight!
|
||||||
|
Trapper Jarrun|Jarrun's Ladder
|
||||||
|
Master Tamer Flummox|Flummoxed
|
||||||
|
Durian Strongfruit|Training with Durian
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argus Pets
|
||||||
|
|
||||||
|
```
|
||||||
|
Ruinhoof|Ruinhoof
|
||||||
|
Deathscreech|Deathscreech
|
||||||
|
Corrupted Blood of Argus|Corrupted Blood of Argus
|
||||||
|
Watcher|Watcher
|
||||||
|
Minixis|Minixis
|
||||||
|
Foulclaw|Foulclaw
|
||||||
|
Retch|Retch
|
||||||
|
Mar'cuus|Mar'cuus
|
||||||
|
One-of-Many|One-of-Many
|
||||||
|
```
|
||||||
|
|
||||||
|
## BFA Master Tamers
|
||||||
|
|
||||||
|
```
|
||||||
|
Captain Hermes|Crab People
|
||||||
|
Dilbert McClint|Night Horrors
|
||||||
|
Michael Skarn|What's the Buzz?
|
||||||
|
Leana Darkwind|Captured Evil
|
||||||
|
Delia Hanako|That's a Big Carcass
|
||||||
|
Lozu|Marshdwellers
|
||||||
|
Korval Darkbeard|Accidental Dread
|
||||||
|
Sizzik|Snakes on a Terrace
|
||||||
|
Karaga|Critters are Friends, Not Food
|
||||||
|
Zujai|Small Beginnings
|
||||||
|
Eddie Fixit|Automated Chaos
|
||||||
|
Fizzie Sparkwhistle|Rogue Azerite
|
||||||
|
Ellie Vern|Sea Creatures Are Weird
|
||||||
|
Kwint|Not So Bad Down Here
|
||||||
|
Burly|Strange Looking Dogs
|
||||||
|
Grady Prett|Pack Leader
|
||||||
|
Keeyo|Keeyo's Champions of Vol'dun
|
||||||
|
Kusa|Desert Survivors
|
||||||
|
Talia Sparkbrow|Add More to the Collection
|
||||||
|
```
|
||||||
|
|
||||||
|
## SL Master Tamers
|
56
wqb.py
Normal file
56
wqb.py
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import json
|
||||||
|
import urllib2
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logging.basicConfig(filename='wqb.log', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', encoding='utf-8', level=logging.DEBUG)
|
||||||
|
|
||||||
|
sl = urllib2.urlopen(urllib2.Request('https://www.wowhead.com/world-quests/sl/eu', headers={'User-Agent': 'Edg/79.0.309.43'})).read()
|
||||||
|
bfa = urllib2.urlopen(urllib2.Request('https://www.wowhead.com/world-quests/bfa/eu', headers={'User-Agent': 'Edg/79.0.309.43'})).read()
|
||||||
|
legion = urllib2.urlopen(urllib2.Request('https://www.wowhead.com/world-quests/legion/eu', headers={'User-Agent': 'Edg/79.0.309.43'})).read()
|
||||||
|
|
||||||
|
config = open('.conf', 'r')
|
||||||
|
config = config.readlines()
|
||||||
|
|
||||||
|
chat_id = config[0].split('=')[1].strip()
|
||||||
|
token = config[1].split('=')[1].strip()
|
||||||
|
|
||||||
|
def send_message(input):
|
||||||
|
data = {
|
||||||
|
'chat_id': chat_id,
|
||||||
|
'text': input
|
||||||
|
}
|
||||||
|
|
||||||
|
req = urllib2.Request('https://api.telegram.org/bot' + token + '/sendMessage')
|
||||||
|
req.add_header('Content-Type', 'application/json')
|
||||||
|
|
||||||
|
response = urllib2.urlopen(req, json.dumps(data))
|
||||||
|
|
||||||
|
logging.info('sent message ' + input)
|
||||||
|
|
||||||
|
qlist = open('ql','r')
|
||||||
|
qlist = qlist.readlines()
|
||||||
|
|
||||||
|
for quest in qlist:
|
||||||
|
quest = quest.rstrip()
|
||||||
|
qsplit = quest.split('|')
|
||||||
|
if len(qsplit) == 2:
|
||||||
|
if (sl.find(qsplit[1]) != -1):
|
||||||
|
send_message('[SL Tamer] ' + qsplit[0] + ' - ' + qsplit[1])
|
||||||
|
if (bfa.find(qsplit[1]) != -1):
|
||||||
|
send_message('[BFA Tamer] ' + qsplit[0] + ' - ' + qsplit[1])
|
||||||
|
if (legion.find(qsplit[1]) != -1):
|
||||||
|
send_message('[Legion Tamer] ' + qsplit[0] + ' - ' + qsplit[1])
|
||||||
|
elif len(qsplit) == 3:
|
||||||
|
if (sl.find(qsplit[1]) != -1):
|
||||||
|
send_message('[SL Tamer] ' + qsplit[0] + ' - ' + qsplit[1] + ' - ' + qsplit[2])
|
||||||
|
if (bfa.find(qsplit[1]) != -1):
|
||||||
|
send_message('[BFA Tamer] ' + qsplit[0] + ' - ' + qsplit[1] + ' - ' + qsplit[2])
|
||||||
|
if (legion.find(qsplit[1]) != -1):
|
||||||
|
send_message('[Legion Tamer] ' + qsplit[0] + ' - ' + qsplit[1] + ' - ' + qsplit[2])
|
||||||
|
else:
|
||||||
|
if (sl.find(quest) != -1):
|
||||||
|
send_message('[SL] ' + quest)
|
||||||
|
if (bfa.find(quest) != -1):
|
||||||
|
send_message('[BFA] ' + quest)
|
||||||
|
if (legion.find(quest) != -1):
|
||||||
|
send_message('[Legion] ' + quest)
|
Reference in New Issue
Block a user