result = push_service.notify_single_device( user_id, message_title=message_title, message_body=message_body, message_icon=images[incident.home_event if incident. home_event != "empty" else incident .away_event]) print(result) current_minute = int(incident.minute[:-1]) db.child("subscriptions").child(user_id).child( user_sub_match_id).set(current_minute) if __name__ == "__main__": push_service = FCMNotification( api_key= "AAAAKVHFP8Q:APA91bHUbwf_vT3Pa99DlONXqsEBtIGmiSqbpaX4vwUCkrQdBgwF_yK6Bn6Q2QEOEvQGTg0i-np5yy-rykHVXKnkIxAykUZErs-huNy2VP7IAF0SepoFhSVzafu-QI9BEe8It-bp4boM" ) scrapper = Scrapper() live_events = scrapper.get_live_events("football") for event in live_events: print(event) if event.scoreLink: notify_about_event(event) scrapper.close() # repeated_timer = RepeatedTimer(1, do_something)