Ignore:
Timestamp:
Sep 29, 2025, 9:18:16 PM (3 days ago)
Author:
iritscen
Message:

Reverted last commit now that test is done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ValBot/Python/check_interwiki_links.py

    r1199 r1200  
    101101      if len(canonical_name) > 100:
    102102         # Certain things can cause the trim to fail; report error and avoid slamming the output with massive page source from a failed trim
    103          pywikibot.stdout('   ERROR: The {0} link "{1}" is a redirect to "{2}..." (string overflow).'.format(the_link.iw_prefix, the_link.page_slug, canonical_name[:100]))
     103         pywikibot.stdout('   ERROR: The {0} link "{1}" is a redirect to "{2}" (string overflow).'.format(the_link.iw_prefix, the_link.page_slug, canonical_name[:100]))
    104104         errors_issued = errors_issued + 1
    105105      else:
     
    107107         if '#' in the_link.page_slug:
    108108            the_link.page_name_only, _ = the_link.page_slug.split('#')
    109             pywikibot.stdout('   The {0} link "{1}" is a redirect to "{2}", which is a valid page. Checking for section on that page....'.format(the_link.iw_prefix, the_link.page_name_only, the_link.page_name))
     109            pywikibot.stdout('   The {0} link "{1}" is a redirect to "{2}", which is a valid page. Checking for section on that page.'.format(the_link.iw_prefix, the_link.page_name_only, the_link.page_name))
    110110            find_section(the_link, True)
    111111         else:
     
    126126      # If linked page is in all caps, e.g. WP:BEANS, it's likely a deliberate use of a redirect
    127127      if the_link.page_slug.startswith('WP:') and the_link.page_slug == the_link.page_slug.upper():
    128          pywikibot.stdout('   Got redirection code "{0}" for {1} link "{2}". This appears to be a deliberate use of a Wikipedia shortcut. Checking the target page....'.format(the_link.curl_response.history[0], the_link.iw_prefix, the_link.page_slug))
     128         pywikibot.stdout('   Got redirection code "{0}" for {1} link "{2}". This appears to be a deliberate use of a Wikipedia shortcut. Checking the target page.'.format(the_link.curl_response.history[0], the_link.iw_prefix, the_link.page_slug))
    129129         find_canonical_link(the_link)
    130130      else:
     
    133133         page_slug_lower = the_link.page_slug.lower()
    134134         if page_slug_lower.startswith(permalink1) or page_slug_lower.startswith(permalink2):
    135             pywikibot.stdout('   Got redirection code "{0}" for {1} permanent revision link "{2}". Checking the target page....'.format(the_link.curl_response.history[0], the_link.iw_prefix, the_link.page_slug))
     135            pywikibot.stdout('   Got redirection code "{0}" for {1} permanent revision link "{2}". Checking the target page.'.format(the_link.curl_response.history[0], the_link.iw_prefix, the_link.page_slug))
    136136            find_canonical_link(the_link)
    137137         else:
     
    148148      unintended_redirects_found = unintended_redirects_found + 1
    149149      possibly_print(the_link)
    150       pywikibot.stdout('   WARNING: Got silently redirected by {0} link "{1}". Checking the target page....'.format(the_link.iw_prefix, the_link.page_slug))
     150      pywikibot.stdout('   WARNING: Got silently redirected by {0} link "{1}". Checking the target page.'.format(the_link.iw_prefix, the_link.page_slug))
    151151      find_canonical_link(the_link) # calls find_section() at end
    152152   elif '#' in the_link.page_slug:
Note: See TracChangeset for help on using the changeset viewer.