FillFromAllPages doesn't grab redirect pages when not using API
Make robots for MediaWiki-powered sites!
Brought to you by:
code_driller
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.
Yes, you are right. Thank you.
Fixed in version 3.12.