Page MenuHomePhabricator

interwiki.py skips non-empty pages
Closed, DeclinedPublic

Description

Actual result:

tools.robokobot@tools-bastion-03:~$ python core/pwb.py interwiki.py -wiktionary -family:wiktionary -lang:en -user:RobokoBot 字条
Retrieving 1 pages from wiktionary:en.
NOTE: [[en:字条]] is empty. Skipping.

interwiki.py seems to skip this page even though it is not empty: https://en.wiktionary.org/wiki/%E5%AD%97%E6%9D%A1

Expected result:
interwiki.py should add:

[[chr:字条]]
[[hu:字条]]
[[mg:字条]]
[[zh:字条]]

Thanks.

Event Timeline

Maybe related with T85676 ?

Do not think so.
I think the reason is that for Page(字条) -> interwiki.page_empty_check(page) gives True.

Yes interwiki.page_empty_check(page) gives True.

See comment for this method:

Pages in content namespaces are considered empty if they contain less than 50
characters, and other pages are considered empty if they are not category
pages and contain less than 4 characters excluding interlanguage links and
categories.

Here we have less than 50 chars in content namespace

See T112340 for the current implementation.

Looking on that task mentioned above I tend to revert that change. As I said there it is an inappropriate implementation.

Xqt triaged this task as Low priority.Apr 23 2017, 12:59 PM

interwiki.py is used very rare yet. Feel free to reopen if you need it implemented.