ne 3. 6. 2018 v 19:46 odesílatel Bináris <[email protected]> napsal:
> 2018-06-03 18:41 GMT+02:00 Martin Urbanec <[email protected]>: > >> I think that Pywikibot's save method should allow explicit overriding of >> a warning raised by abuse filter. It shouldn't be the default state, but it >> should be possible. Anyway, having a bot regulary hitting AF isn't a good >> idea - talk with an admin of your wiki. >> > No, this is not regular. But just allowing does not solve the original > problem that the bot silently failed without notifying the owner. (The > solution in this case was a manual archiving.) > Well, failed sliently? Again, I run the same bot in cs.wiki and this is what I can see in logs. Looking for: {{Šablona:Archivace}} in [[cs:Diskuse:Moravská vlajka]] Processing 1 threads Only 1 (< 2) threads are old enough. Skipping Processing [[cs:Diskuse:Česko]] 13 Threads found on [[cs:Diskuse:Česko]] Looking for: {{Šablona:Archivace}} in [[cs:Diskuse:Česko]] Processing 13 threads 13 Threads found on [[cs:Diskuse:Česko/archiv-02]] Only 3 (< 10) threads are old enough. Skipping Processing [[cs:Wikipedista:ArchivačníBot/test1]] 1 Threads found on [[cs:Wikipedista:ArchivačníBot/test1]] Looking for: {{Šablona:Archivace}} in [[cs:Wikipedista:ArchivačníBot/test1]] Processing 1 threads Only 0 (< 1) threads are old enough. Skipping Processing [[cs:Wikipedista:ArchivačníBot/test3]] 1 Threads found on [[cs:Wikipedista:ArchivačníBot/test3]] Looking for: {{Šablona:Archivace}} in [[cs:Wikipedista:ArchivačníBot/test3]] Processing 1 threads Processing [[cs:Diskuse s wikipedistou:Chmee2]] 4 Threads found on [[cs:Diskuse s wikipedistou:Chmee2]] Looking for: {{Šablona:Archivace}} in [[cs:Diskuse s wikipedistou:Chmee2]] Processing 4 threads Only 0 (< 1) threads are old enough. Skipping Processing [[cs:Diskuse s wikipedistou:HypoBOT]] 1 Threads found on [[cs:Diskuse s wikipedistou:HypoBOT]] Looking for: {{Šablona:Archivace}} in [[cs:Diskuse s wikipedistou:HypoBOT]] Processing 1 threads 2 Threads found on [[cs:Diskuse s wikipedistou:HypoBOT/archiv 2017-1]] Only 1 (< 2) threads are old enough. Skipping Processing [[cs:Diskuse s wikipedistou:JAn Dudík]] 21 Threads found on [[cs:Diskuse s wikipedistou:JAn Dudík]] Looking for: {{Šablona:Archivace}} in [[cs:Diskuse s wikipedistou:JAn Dudík]] Processing 21 threads 138 Threads found on [[cs:Diskuse s wikipedistou:JAn Dudík/archiv 2017-1]] Archiving 8 thread(s). ERROR: Error occurred while processing page [[cs:Diskuse s wikipedistou:JAn Dudík]] ERROR: SpamfilterError: Edit to page [[Diskuse s wikipedistou:JAn Dudík/archiv 2017-1]] rejected by spam filter due to content: twitter.com/search ERROR: SpamfilterError: Edit to page [[Diskuse s wikipedistou:JAn Dudík/archiv 2017-1]] rejected by spam filter due to content: twitter.com/search Traceback (most recent call last): File "/shared/pywikipedia/core/scripts/archivebot.py", line 819, in main archiver.run() File "/shared/pywikipedia/core/scripts/archivebot.py", line 713, in run self.archives[a].update(comment) File "/shared/pywikipedia/core/scripts/archivebot.py", line 531, in update self.save(summary) File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1520, in wrapper return obj(*__args, **__kw) File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1520, in wrapper return obj(*__args, **__kw) File "/shared/pywikipedia/core/pywikibot/page.py", line 1264, in save cc=apply_cosmetic_changes, quiet=quiet, **kwargs) File "/shared/pywikipedia/core/pywikibot/page.py", line 136, in wrapper handle(func, self, *args, **kwargs) File "/shared/pywikipedia/core/pywikibot/page.py", line 127, in handle raise err SpamfilterError: Edit to page [[Diskuse s wikipedistou:JAn Dudík/archiv 2017-1]] rejected by spam filter due to content: twitter.com/search Framework report problems, bot operators should monitor logs. I know that this is spamfilter and not abusefilter, but Pywikibot behaves the same way even if an abusefilter has rejected given change. See the following manual example: tools.urbanecmbot@tools-bastion-02 ~ $ python Python 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pywikibot >>> site = pywikibot.Site('cs', 'wikipedia') >>> page = pywikibot.Page(site, u"Wikipedista:Martin Urbanec/Pískoviště/1") >>> page.text = "This is a test" >>> page.save() Sleeping for 9.5 seconds, 2018-06-03 22:19:23 ERROR: editpage: abusefilter-disallowed Hit AbuseFilter: Test filter, WARNING: Page [[Wikipedista:Martin Urbanec/Pískoviště/1]] not saved Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1446, in wrapper return obj(*__args, **__kw) File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1446, in wrapper return obj(*__args, **__kw) File "/shared/pywikipedia/core/pywikibot/page.py", line 1270, in save cc=apply_cosmetic_changes, quiet=quiet, **kwargs) File "/shared/pywikipedia/core/pywikibot/page.py", line 127, in wrapper handle(func, self, *args, **kwargs) File "/shared/pywikipedia/core/pywikibot/page.py", line 118, in handle raise err pywikibot.exceptions.PageSaveRelatedError: Page [[cs:Wikipedista:Martin Urbanec/Pískoviště/1]] was not saved. >>> Of course Pywikibot didn't report it by email, because it will be unexpectable (and, to be precise, Pywikibot do not always have a way to email you - for example, my Pywikibot bot password don't allow emailing (well, maybe it does, I'm not sure, but it isn't required to allow it). >> On Czech Wikipedia, filters that would be hit by archivebot has >> exception, generally !"bot" in user_groups. This allows cs.wiki to warn >> users that may or may not know what is happening and allow bots to do their >> maintenance work without being warned because their operators are expected >> to know what is ok and what is not. >> > In the given case the filter itself caused the problem, and I wrote the > filter. Many years ago I didn't think of limiting the filter to main > namespace. I opened this thread because the problem is general. !"bot" > in user_groups allows ALL bots to avoid the filter, and this is not right. > > _______________________________________________ > pywikibot mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/pywikibot >
_______________________________________________ pywikibot mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot
