--- ValBot/Python/check_intrawiki_section_links.py 2023/08/15 02:03:16 1185 +++ ValBot/Python/check_intrawiki_section_links.py 2024/01/23 03:53:05 1188 @@ -64,9 +64,6 @@ def find_section(page_text, page_name, p target_page_name_human = target_page_name.replace('_', ' ') if debug: pywikibot.stdout(' Searching for section link {} on page.'.format(anchor_name)) - # Convert slash character to the dot-notation hex encoding that MediaWiki uses - anchor_name = anchor_name.replace('/', '.2F') - # Read linked page to see if it really has this anchor link soup = BeautifulSoup(page_text, 'html.parser') found_section = False @@ -86,7 +83,7 @@ def find_section(page_text, page_name, p break if found_section == False: possibly_print(page_name) - pywikibot.stdout(' ERROR: Could not find section "{0}" on page {1}!'.format(anchor_name, pre_section)) + pywikibot.stdout(' ERROR: Could not find section "{0}" on page {1}!'.format(anchor_name, target_page_name_human)) errors_issued += 1 elif debug and print_result: pywikibot.stdout(' The section "{0}" was found on page "{1}".'.format(anchor_name, target_page_name_human))