Board Thread:Script Suggestions/@comment-43962992-20191114025313/@comment-26497423-20191114030146

Howdy doody, for starters I'm not a Python dev so I couldn't help you if you were using a python-specific library for interacting with the API, and I have no idea how the  values are interpolated if they're between single quotes (shouldn't they be on their own,  ?)

Though you seem to be using api.php directly, which I have some experience with: mw:API:Edit is the endpoint you're using, and as you can see, it defines no  parameter. These are encoded as regular wikilinks (usually at the end of the page). You could just add at the end of the  parameter

Now, if you were adding a category to an already existing page, you can just use the mw:API:Categories endpoint, it should be much easier to handle