Menu

#101 FillFromAllPages doesn't grab redirect pages when not using API

closed-fixed
None
2015-04-08
2015-01-22
Luke
No

When site API mode is turned off, the acceptRedirects option in FillFromAllPages is not actually finding any redirect pages.

This seems to be because the regex doesn't account for the class attribute in the A tag.

new Regex("<td[^>]*>(?:<div class=\"allpagesredirect\">)?" +
"<a href=\"[^\"]*?\" title=\"([^\"]*?)\">");

Suggest instead:

new Regex("<td[^>]*>(?:<div class=\"allpagesredirect\">)?" +
"<a href=\"[^\"]*?\" (?:class=\"mw-redirect\" )?title=\"([^\"]*?)\">");

I'm seeing this on version 2.103, though 3.11 looks to have the same.

Discussion

  • CodeDriller

    CodeDriller - 2015-01-22

    Yes, you are right. Thank you.

     
  • CodeDriller

    CodeDriller - 2015-01-30
    • status: open --> closed-fixed
    • assigned_to: CodeDriller
     
  • CodeDriller

    CodeDriller - 2015-01-30

    Fixed in version 3.12.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.