Browse Source

made the git fetch for small changes probably through usage

master
alpcentaur 11 months ago
parent
commit
fe2950d634
2 changed files with 42 additions and 10 deletions
  1. +41
    -9
      fdb_spider_interface.py
  2. +1
    -1
      new_message_file.txt

+ 41
- 9
fdb_spider_interface.py View File

@ -41,10 +41,14 @@ if __name__ == '__main__':
# myinfo = api.get_my_info()
#room_history = api.get_private_room_history(room_id)
#print(room_history['messages'][0]['msg'])
# print(myinfo)
# rooms = api.get_private_rooms()
rooms = api.get_private_rooms()
# print(rooms)
print('blubidab oioioi', rooms)
# api.send_message('Ole', room_id)
@ -138,6 +142,11 @@ if __name__ == '__main__':
room_tags = room[3]
#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):
#print('room_fdb',room_fdb, 'fdb_list',fdb_list)
try:
@ -174,11 +183,15 @@ if __name__ == '__main__':
except:
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
entry_message = '<' + url + '|' + data[room_fdb][i][key]["name"]+ '>' + '\n' + data[room_fdb][i][key]["info"]
if message_was_already_there == False:
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])
except Exception as e:
print("probably i was not there in last page, original error is:", e)
@ -404,6 +417,17 @@ if __name__ == '__main__':
room_tags = room[3]
#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):
#print('room_fdb',room_fdb, 'fdb_list',fdb_list)
try:
@ -440,11 +464,19 @@ if __name__ == '__main__':
except:
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"]
api.send_message(entry_message, room[0])
api.send_message(entry_message, room[0])
except Exception as e:
print("probably i was not there in last page, original error is:", e)
@ -504,7 +536,7 @@ if __name__ == '__main__':
try:
new_room = api.create_public_room(room_name,
members=[latest_message_user_username],
read_only=True)
read_only=False)
new_room_id = new_room['channel']['_id']
room_file = open('rooms/' + new_room_id + '.txt', 'w')
room_file.write( room_name + '§%§%' + databases + '§%§%' + filters)

+ 1
- 1
new_message_file.txt View File

@ -1 +1 @@
deleteroom 65737f4aebb39dd248d0cff1§%§%FyCwhRtdqAnrmHvP9
createroom oioitestroom3 ['giz'] ['solar','regenerative','sustainable','energy']§%§%vMKkL8H6t6MScmj6t

Loading…
Cancel
Save