@@ -619,38 +619,25 @@ def debug_mismatches(
619
619
for section_name in section_names_list :
620
620
current_section_count = 0
621
621
print (f"Getting links from section { section_name } ..." )
622
- section_anchor = soup .find ("a" , {"name" : f"lin_{ section_name } " })
623
-
624
- if section_anchor :
625
- next_element = section_anchor .find_next_sibling ()
626
- while next_element :
627
- if next_element .name == "table" :
628
- hrefs = [
629
- a ["href" ] for a in next_element .find_all ("a" , href = True )
630
- ]
631
- for href in hrefs :
632
- if (
633
- section_limit != 0
634
- and current_section_count >= section_limit
635
- ):
636
- break
637
- repro_urls_list .append (urljoin (fuzzcorp_url , href ))
638
- current_section_count += 1
639
- break
640
- elif (
641
- next_element .name == "p"
642
- and "No bugs found" in next_element .text
643
- ):
644
- print (f"No bugs found for section { section_name } ." )
645
- break
646
- elif next_element .name == "a" and next_element .has_attr ("name" ):
647
- print (f"No table found in section { section_name } ." )
648
- break
649
-
650
- next_element = next_element .find_next_sibling ()
651
-
652
- if not next_element :
653
- print (f"No relevant content found after section { section_name } ." )
622
+ lineage_div = soup .find ("div" , id = f"lin_{ section_name } " )
623
+
624
+ if lineage_div :
625
+ tables = lineage_div .find_all ("table" )
626
+ if len (tables ) > 1 :
627
+ issues_table = tables [1 ]
628
+ hrefs = [
629
+ link ["href" ] for link in issues_table .find_all ("a" , href = True )
630
+ ]
631
+ for href in hrefs :
632
+ if (
633
+ section_limit != 0
634
+ and current_section_count >= section_limit
635
+ ):
636
+ break
637
+ repro_urls_list .append (urljoin (fuzzcorp_url , href ))
638
+ current_section_count += 1
639
+ else :
640
+ print (f"No bugs found for section { section_name } ." )
654
641
else :
655
642
print (f"Section { section_name } not found." )
656
643
0 commit comments