'#' is special in python, maybe the regex gets post-processed into becoming
a comment? Try escaping it.
Strainu
Pe marți, 18 august 2020, John Bray <johnbray822(a)gmail.com> a scris:
I'd like to get all the redirect pages out of a
wiki, but
pwb.py listpages -start:UK -grep:'#REDIRECT' -format:"{page.title}"
-get
produces nothing, but
pwb.py listpages -start:UK -grep:'United Kingdom'
-format:"{page.title}"
-get
produces, as expected
UK
#REDIRECT [[United Kingdom]]
pwb.py listpages -start:UK -grep:'#' -format:"{page.title}" -get
picks up pages with a # in them, but not any of the #REDIRECTs
why isn't -grep just parsing the page fully?
John
_______________________________________________
pywikibot mailing list
pywikibot(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot