Browse Source

added first updaterooms all command syntax change instead of only updaterooms updating all rooms

master
alpcentaur 10 months ago
parent
commit
a59978ec5b
3 changed files with 10 additions and 4 deletions
  1. +7
    -3
      fdb_spider_interface.py
  2. +1
    -1
      new_message_file.txt
  3. +2
    -0
      roomhistories/65afd8b77954218b501634f2.txt

+ 7
- 3
fdb_spider_interface.py View File

@ -406,7 +406,7 @@ if __name__ == '__main__':
command : `printfdbs` command : `printfdbs`
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
To update all rooms use To update all rooms use
command : `updaterooms`
command : `updaterooms all`
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
To update one room use the room_id from the output of printrooms: To update one room use the room_id from the output of printrooms:
command : `updaterooms <room-id>` command : `updaterooms <room-id>`
@ -488,7 +488,7 @@ if __name__ == '__main__':
data = dict({}) data = dict({})
for room in room_list: for room in room_list:
if room[0] == room_to_update or room_to_update == 'NONE':
if room[0] == room_to_update or room_to_update == 'all':
room_was_found = True room_was_found = True
print(room[0]) print(room[0])
room_fdbs = room[2] room_fdbs = room[2]
@ -549,7 +549,11 @@ if __name__ == '__main__':
print('oioioioioiOIOIOI') print('oioioioioiOIOIOI')
for key in data[room_fdb][i]: for key in data[room_fdb][i]:
contains_tag = False contains_tag = False
period_data_formatted = dateutil.parser.parse(data[room_fdb][i][key]["period"])
try:
period_data_formatted = dateutil.parser.parse(data[room_fdb][i][key]["period"])
except Exception as e:
period_data_formatted = 'NONE'
print('getting the period did not work for', room_fdb, i, key, ' ori err is:', e)
name_data_lower = [word.lower() for word in data[room_fdb][i][key]["name"].split(' ')] name_data_lower = [word.lower() for word in data[room_fdb][i][key]["name"].split(' ')]
info_data_lower = [word.lower() for word in data[room_fdb][i][key]["info"].split(' ')] info_data_lower = [word.lower() for word in data[room_fdb][i][key]["info"].split(' ')]
text_data_lower = [word.lower() for word in data[room_fdb][i][key]["text"].split(' ')] text_data_lower = [word.lower() for word in data[room_fdb][i][key]["text"].split(' ')]

+ 1
- 1
new_message_file.txt View File

@ -1 +1 @@
updaterooms 65afd8b77954218b501634f2§%§%Z4SCmA6Ydbs7YHHHo
updaterooms 65afd8b77954218b501634f2§%§%uBPGeQtsNmy3wvSga

+ 2
- 0
roomhistories/65afd8b77954218b501634f2.txt View File

@ -0,0 +1,2 @@
<https://www.evergabe-online.de/tenderdetails.html?id=579039|Lieferung Harnstofflösung (April - September 2024)>
<https://www.evergabe-online.de/tenderdetails.html?id=568229|Forschungsvorhabens zur Kraftwerksstrategie (2024-2025)>

Loading…
Cancel
Save