@@ -138,13 +138,13 @@ def announcement_to_banner_meta(chs_ann: dict, all_announcements: list) -> list[
138138 elif "本祈愿属于「集录祈愿」" in content_text :
139139 uigf_pool_type = 500
140140 content_text_no_space = content_text .replace (" " , "" )
141- orange_characters_re_list = re .search (r"5星角色:(?P<r>[^ 5星武器:]+) " , content_text_no_space ).group ("r" ).split ("/" )
141+ orange_characters_re_list = re .search (r"5星角色:(?P<r>.*?) 5星武器:" , content_text_no_space ).group ("r" ).split ("/" )
142142 print (f"Orange characters re list: { orange_characters_re_list } " )
143- purple_characters_re_list = re .search (r"4星角色:(?P<r>[^ 4星武器:]+ )" , content_text_no_space ).group ("r" ).split ("/" )
143+ purple_characters_re_list = re .search (r"4星角色:(?P<r>.*?)(?= 4星武器:)" , content_text_no_space ).group ("r" ).split ("/" )
144144 print (f"Purple characters re list: { purple_characters_re_list } " )
145- orange_weapons_re_list = re .search (r"5星武器:(?P<r>[^ 4星角色:]+) " , content_text_no_space ).group ("r" ).split ("/" )
145+ orange_weapons_re_list = re .search (r"5星武器:(?P<r>.*?) 4星角色:" , content_text_no_space ).group ("r" ).split ("/" )
146146 print (f"Orange weapons re list: { orange_weapons_re_list } " )
147- purple_weapons_re_list = re .search (r"4星武器:(?P<r>[^※]+ )" , content_text_no_space ).group ("r" ).split ("/" )
147+ purple_weapons_re_list = re .search (r"4星武器:(?P<r>.*?)(?=※ )" , content_text_no_space ).group ("r" ).split ("/" )
148148 print (f"Purple weapons re list: { purple_weapons_re_list } " )
149149 # Remove duplicates and keep order
150150 orange_list = []
@@ -160,6 +160,8 @@ def announcement_to_banner_meta(chs_ann: dict, all_announcements: list) -> list[
160160 print (f"Purple list: { purple_list } " )
161161 print (f"Orange ID list: { orange_id_list } " )
162162 print (f"Purple ID list: { purple_id_list } " )
163+ print (f"Total count of Orange: { len (orange_id_list )} " )
164+ print (f"Total count of Purple: { len (purple_id_list )} " )
163165 else :
164166 return None
165167
0 commit comments