[pywikibot] Re: How to analyze block logs?

2022-11-02 Thread Bináris
Roy Smith ezt írta (időpont: 2022. nov. 2., Sze, 18:19): > 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%' > This works for

[pywikibot] Re: How to analyze block logs?

2022-11-02 Thread Roy Smith
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

[pywikibot] Re: How to analyze block logs?

2022-11-02 Thread Bináris
Roy, thank you! This is great! My version is https://quarry.wmcloud.org/query/68559 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] Re: How to analyze block logs?

2022-11-01 Thread info
Btw the quarry url can be passed as pagegenerators -url option:https://doc.wikimedia.org/pywikibot/stable/api_ref/pywikibot.pagegenerators.html?highlight=pagegenerators#generator-optionshttps://phabricator.wikimedia.org/T239436xqtAm 02.11.2022 um 02:57 schrieb i...@gno.de:Hi Roy,this is great.

[pywikibot] Re: How to analyze block logs?

2022-11-01 Thread info
Hi Roy,this is great. And It would be nice to have a Pywikibot interface to quarry I think.xqtAm 02.11.2022 um 02:29 schrieb i...@gno.de:Hi,I think blocks() can be used:https://doc.wikimedia.org/pywikibot/stable/api_ref/pywikibot.site.html#pywikibot.site._generators.GeneratorsMixin.blocksbut

[pywikibot] Re: How to analyze block logs?

2022-11-01 Thread info
Hi,I think blocks() can be used:https://doc.wikimedia.org/pywikibot/stable/api_ref/pywikibot.site.html#pywikibot.site._generators.GeneratorsMixin.blocksbut there is no possibility for expiry filtering and you have to do it with the query result.Maybe MySQL or SPARQL gives a way but I am not

[pywikibot] Re: How to analyze block logs?

2022-11-01 Thread Roy Smith
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

[pywikibot] Re: How to analyze block logs?

2022-11-01 Thread John
Nothing currently exists, but should be fairly easy using a log parser and a local database. On Tue, Nov 1, 2022 at 5:39 PM Bináris 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