made the git fetch for small changes probably through usage
This commit is contained in:
parent
a7a3cb2621
commit
fe2950d634
2 changed files with 43 additions and 11 deletions
|
@ -41,10 +41,14 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# myinfo = api.get_my_info()
|
# myinfo = api.get_my_info()
|
||||||
|
|
||||||
# print(myinfo)
|
#room_history = api.get_private_room_history(room_id)
|
||||||
# rooms = api.get_private_rooms()
|
|
||||||
|
|
||||||
# print(rooms)
|
#print(room_history['messages'][0]['msg'])
|
||||||
|
|
||||||
|
# print(myinfo)
|
||||||
|
rooms = api.get_private_rooms()
|
||||||
|
|
||||||
|
print('blubidab oioioi', rooms)
|
||||||
|
|
||||||
# api.send_message('Ole', room_id)
|
# api.send_message('Ole', room_id)
|
||||||
|
|
||||||
|
@ -138,6 +142,11 @@ if __name__ == '__main__':
|
||||||
room_tags = room[3]
|
room_tags = room[3]
|
||||||
#subprocess.run(["python", spider_directory + 'main.py', fdbs])
|
#subprocess.run(["python", spider_directory + 'main.py', fdbs])
|
||||||
|
|
||||||
|
|
||||||
|
date = datetime.datetime.now() - timedelta(days=3)
|
||||||
|
|
||||||
|
room_history = api.get_room_history(room[0], oldest=date, latest=datetime.datetime.now())
|
||||||
|
|
||||||
for room_fdb in eval(room_fdbs):
|
for room_fdb in eval(room_fdbs):
|
||||||
#print('room_fdb',room_fdb, 'fdb_list',fdb_list)
|
#print('room_fdb',room_fdb, 'fdb_list',fdb_list)
|
||||||
try:
|
try:
|
||||||
|
@ -174,8 +183,12 @@ if __name__ == '__main__':
|
||||||
except:
|
except:
|
||||||
url = data[room_fdb][i][key]["link"]
|
url = data[room_fdb][i][key]["link"]
|
||||||
|
|
||||||
|
message_was_already_there = False
|
||||||
|
for message in room_history['messages']:
|
||||||
|
if name_data_lower.join(' ') in message['msg']:
|
||||||
|
message_was_already_there = True
|
||||||
|
|
||||||
|
if message_was_already_there == False:
|
||||||
entry_message = '<' + url + '|' + data[room_fdb][i][key]["name"]+ '>' + '\n' + data[room_fdb][i][key]["info"]
|
entry_message = '<' + url + '|' + data[room_fdb][i][key]["name"]+ '>' + '\n' + data[room_fdb][i][key]["info"]
|
||||||
|
|
||||||
api.send_message(entry_message, room[0])
|
api.send_message(entry_message, room[0])
|
||||||
|
@ -404,6 +417,17 @@ if __name__ == '__main__':
|
||||||
room_tags = room[3]
|
room_tags = room[3]
|
||||||
#subprocess.run(["python", spider_directory + 'main.py', fdbs])
|
#subprocess.run(["python", spider_directory + 'main.py', fdbs])
|
||||||
|
|
||||||
|
#myinfo = api.get_room_info(room[0])
|
||||||
|
#print(myinfo)
|
||||||
|
roomid = "'657cbeccebb39dd248d38ec3'"
|
||||||
|
|
||||||
|
roomoioioi = api.get_user_info(bot_user_id)
|
||||||
|
|
||||||
|
print(roomoioioi)
|
||||||
|
|
||||||
|
room_history_updateroom = api.get_private_room_history(room[0])
|
||||||
|
|
||||||
|
|
||||||
for room_fdb in eval(room_fdbs):
|
for room_fdb in eval(room_fdbs):
|
||||||
#print('room_fdb',room_fdb, 'fdb_list',fdb_list)
|
#print('room_fdb',room_fdb, 'fdb_list',fdb_list)
|
||||||
try:
|
try:
|
||||||
|
@ -440,6 +464,14 @@ if __name__ == '__main__':
|
||||||
except:
|
except:
|
||||||
url = data[room_fdb][i][key]["link"]
|
url = data[room_fdb][i][key]["link"]
|
||||||
|
|
||||||
|
print('101110001101010010010101000111')
|
||||||
|
|
||||||
|
message_was_already_there = False
|
||||||
|
for message in room_history['messages']:
|
||||||
|
if name_data_lower.join(' ') in message['msg']:
|
||||||
|
message_was_already_there = True
|
||||||
|
|
||||||
|
if message_was_already_there == False:
|
||||||
|
|
||||||
|
|
||||||
entry_message = '<' + url + '|' + data[room_fdb][i][key]["name"]+ '>' + '\n' + data[room_fdb][i][key]["info"]
|
entry_message = '<' + url + '|' + data[room_fdb][i][key]["name"]+ '>' + '\n' + data[room_fdb][i][key]["info"]
|
||||||
|
@ -504,7 +536,7 @@ if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
new_room = api.create_public_room(room_name,
|
new_room = api.create_public_room(room_name,
|
||||||
members=[latest_message_user_username],
|
members=[latest_message_user_username],
|
||||||
read_only=True)
|
read_only=False)
|
||||||
new_room_id = new_room['channel']['_id']
|
new_room_id = new_room['channel']['_id']
|
||||||
room_file = open('rooms/' + new_room_id + '.txt', 'w')
|
room_file = open('rooms/' + new_room_id + '.txt', 'w')
|
||||||
room_file.write( room_name + '§%§%' + databases + '§%§%' + filters)
|
room_file.write( room_name + '§%§%' + databases + '§%§%' + filters)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
deleteroom 65737f4aebb39dd248d0cff1§%§%FyCwhRtdqAnrmHvP9
|
createroom oioitestroom3 ['giz'] ['solar','regenerative','sustainable','energy']§%§%vMKkL8H6t6MScmj6t
|
Loading…
Reference in a new issue