You may be able to do this with a SQL query against the database.

https://quarry.wmcloud.org/query/68543

I think this does what you want, with the proviso that once a block expires, it falls out of the ipblocks table, so you'll be able to see blocks that are about to expire, but once they do expire, they're gone from the table so you've missed them.  At least I think that's how it works.

Parameterize this to have an appropriate limit for ipb_expiry, and add some logic to search comment_text for "open proxy" or whatever, and I think that's basically what you want.

On Nov 1, 2022, at 5:39 PM, BinĂ¡ris <wikiposta@gmail.com> wrote:

Hi,

I want to write a script that monitors block logs or the list of active blocks for a certain reason (open proxy), and warns me if a block expires soon.
Warning may be written either to a noticeboard or a mailing list, the main thing is to find them.
Rationale: we give 1 year block for proxies, but after expiration they are likely to be still open, and need revision.

Do we have a clever tool for this? How would you begin the task?

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