@@ -52,6 +52,7 @@ def format_notice(notices, session):
5252
5353 try :
5454 data = parseBody (notice , session , year , id_ )
55+ notice ['Body' ] = data
5556 body , links = parseLinks (data )
5657 body += '''
5758--------------
@@ -90,6 +91,8 @@ def format_notice(notices, session):
9091 break
9192
9293 if len (attachment ) != 0 :
94+ notice ['Attachment' ] = attachment
95+
9396 file_name = notification ['Attachment' ]
9497 if save_file (file_name , attachment ):
9598 notification ['Attachment' ] = file_name
@@ -104,6 +107,7 @@ def format_notice(notices, session):
104107
105108
106109def send (notifications , notice_db ):
110+ print ('[SENDING NOTIFICATIONS]' , flush = True )
107111
108112 for notif in notifications :
109113 notification = notif .get ('formatted_notice' )
@@ -116,9 +120,6 @@ def send(notifications, notice_db):
116120 if len (latest_successful_subscribers ) != 0 :
117121 ntfy_topics = [subscirber for subscirber in ntfy_topics if subscirber not in latest_successful_subscribers ]
118122
119- if ntfy_topics :
120- print ('[SENDING NOTIFICATIONS]' , flush = True )
121-
122123 for ntfy_topic in ntfy_topics :
123124 try :
124125 query_params = f"message={ quote (notification ['Body' ])} "
0 commit comments