There's a bunch of block reason templates such as {{blocked proxy}}, {{webhostblock}}, etc.  They don't always get used, but they're good things to look for before you fall back to just comment_text like '%proxy%'

I don't think you need to check for ipb_expiry != 'infinity'.  People who know SQL better than I do would know for sure, but I think the previous clause (ipb_expiry < now() + interval 1 month) would always be false in that case.

On Nov 2, 2022, at 12:58 PM, BinĂ¡ris <wikiposta@gmail.com> wrote:

Roy, thank you! This is great!
Next step is to try to use it with Pywikibot as Xqt said.

_______________________________________________
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org