I have been using an outdated version of Pywikibot and Python 2 and finally got around to upgrading to Python 3 and Pywikibot 8. All support for "sysop" accounts seems to have been removed and there's no documentation I can find on how to work with two accounts, one of which is a bot account and one of which is a sysop account. The manual page https://www.mediawiki.org/wiki/Manual:Pywikibot/delete.py for the delete script, which requires sysop access, says you need your user-config.py to have the sysop account listed in place of the bot account. Does that mean I need to manually edit the file every time I need to switch between doing a regular bot action and a bot action requiring sysop access? There must be a better way. Trying to read through https://phabricator.wikimedia.org/T71283, people seem to have suggested the possibility of allowing multiple accounts to be listed for a given Wiki, but that doesn't seem to be implemented. It's hard for me to believe such basic functionality was simply removed with no replacement in mind.
How are you supposed to do admin/sysop actions with Pywikibot 8?
61 Views Asked by Urban Vagabond At
1
There are 1 best solutions below
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in MEDIAWIKI
- On Mediawiki the notifications does not work. But e-mails for creating an new account are. How can this be solved?
- How to upload files to MediaWiki APIs in Rust?
- Distributing Elements in CSS
- How to create a whitepage everyone can see before login in MediaWiki?
- MediaWiki API executing JavaScript from URL parameters
- How to deal with [Error creating thumbnail] in mediawiki when upload video by TimedMediaHandler?
- Could not authenticate credentials against "LDAP" - MediaWiki
- How can I get the latest "flagged revision" using wiktionary/wikipedia api in python?
- Mediawiki: passing advanced values to a #invoke?
- Is there a way to fetch Wikipedia/Wiktionary HTML only for the main article body?
- MediaWiki API error: Login failed: Unable to continue login. Your session most likely timed out
- wikipedia php api plcontinue
- Wikibase install: Items do not show "add statement"
- MediaWiki Table of Contents - Use CSS to: Scroll not working or being overridden
- How to add a footer icon with JS in MediaWiki
Related Questions in PYWIKIBOT
- What is the regex to find any English words for find and replace mode of pywikibot
- How to extract information (e.g. types and subtypes) from Wikipedia?
- How to find out the name of an item having the wikidata code Q89 =>(apple)
- Get "also known as"-properties from wikidata in pywikibot
- How to iterate over a CSV file with Pywikibot
- Issues while writing HTML file
- How do I get the HTML of a wiki page with Pywikibot?
- Creating claims of "local media" to "items" through api interface
- Configuring Pywikibot to use a wikimedia install's bot
- Imports working with raw file, but not in IDLE
- How does Pywikipedia manage colours on the command line?
- Login and accessing wikipedia API using pywikipedia
- Wikipedia revision history using pywikibot: size of revision (follow-up)
- How to add space in python's search/find string?
- How to stop auto-generation of log files by cron?
Related Questions in WIKTIONARY
- How can I get the latest "flagged revision" using wiktionary/wikipedia api in python?
- How can I extract personal names from this JSON file (wiktionary dump)?
- Get list of nouns and declension of a word from Wiktionary API
- How are you supposed to do admin/sysop actions with Pywikibot 8?
- Getting Wiktionary Term from DBPedia Sparql Endpoint with RDFSharp
- Mapping from Wiktionary part-of-speech tags to 12 universal part-of-speech tags
- Wiktionary API: Get tags for a word, and specify language
- How to find only English language words using Wiktionary search box?
- Graph built by using wiktionary data
- Extraction german verb conjugations from xml dump templates
- English Wiktionary API: declension table missing in the output
- Query Wiktionary only returns few words
- Change wikitext from Wiktionary to readable text
- How to parse Wiktionary templates and modules
- dbnary SPARQL query yield zero results, how to find the cause?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
How to use multiple accounts with Pywikibot?
Introduction
The dualism between bot account and sysop account was given up few years ago in favor of having multiple accounts instead e.g. sysop account, test account production account etc.
Since Pywikibot 8 each account has his own cookie file which holds access information after logged in, see this patch which solves T324000. This means that is is no longer necessary to re-login after account switch. Also 2FA login (usally for sysop accounts) was introduced with Pywikibot 8.
Global options
Usually Pywikibot uses a
user-config.pyfile to hold settings for a given user account. Read Account Settings section in documentation how to use it. With Pywkibot 7.7 a global-configoption was introduced; this enables additional config files for other accounts, e.g.-config:mybot-configreads the settings frommybot-config.pyinstead ofuser-config.py.You can also determine the base directory using global
-diroption and place the user-config.py file into a different folder.But there is another global option
-userwhich enables using am account different from that user account which is registered in theuser-config.pyor any other setting file used with-configoption.It is recommended to use the pwb wrapper script to eable global options with all private scripts (and some additional features).
How to proceed
use
-userglobal option to run a script with that given account, e.g.pwb -user:mybotaccount myscript --myoptionspwb -user:mysysopaccount myotherscript --otheroptionsuse
-configglobal option to run a script with that given config file, e.g.pwb -config:mybot-config myscript --myoptionspwb -user:mysysop-config myotherscript --otheroptionsuse
-dirglobal option load a config file from a different folder, e.g.pwb -dir:thispath myscript --myoptionspwb -user:thatpath myotherscript --otheroptionsNote
Different accounts may have different user rights. Pywikibot differentiates according to user rights and no longer according to group membership.