jenkins-bot has submitted this change and it was merged.
Change subject: get categories from wikitext in the AddCategory bot ......................................................................
get categories from wikitext in the AddCategory bot
Using the textlib.getCategoryLinks() function instead of the Page.categories() method, to prevent transcluded categories from being added directly to the page content.
This follows I05fa90523f718f09de83d03aab3bd9d031e7cbbb
bug: 58084 Change-Id: I900de3d9d1f30cbf2034e7e14f7127e08644f29e --- M scripts/category.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Nullzero: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/category.py b/scripts/category.py index cf07768..95817ae 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -377,7 +377,7 @@ return # store old text, so we don't have reload it every time old_text = text - cats = [c for c in page.categories()] + cats = textlib.getCategoryLinks(text) # Show the title of the page we're working on. # Highlight the title in purple. pywikibot.output(