Add mwclient wrapper methods for MediaWiki API operations#7
Closed
Add mwclient wrapper methods for MediaWiki API operations#7
Conversation
Copilot stopped work on behalf of
MrIbrahem due to an error
March 1, 2026 07:35
Copilot stopped work on behalf of
MrIbrahem due to an error
March 1, 2026 07:36
Copilot stopped work on behalf of
MrIbrahem due to an error
March 1, 2026 07:36
Copilot stopped work on behalf of
MrIbrahem due to an error
March 1, 2026 07:37
Copilot
AI
changed the title
[WIP] Copilot Request
Add mwclient wrapper methods for MediaWiki API operations
Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Analyzed codebase to identify functions replaceable by
mwclientlibrary methods. Added wrapper methods with automatic fallback to raw API when mwclient unavailable.Changes
MainPage (
super_page.py)get_text_mwclient(),save_mwclient(),purge_mwclient(),exists_mwclient()get_categories_mwclient(),get_langlinks_mwclient(),get_templates_mwclient()get_extlinks_mwclient(),get_backlinks_mwclient(),get_revisions_mwclient()NEW_API (
bot_api.py)Search_mwclient(),Get_All_pages_mwclient(),Get_Newpages_mwclient()UserContribs_mwclient(),get_logs_mwclient(),expandtemplates_mwclient()BOTS_APIS (
S_API/bot.py)append_mwclient(),prepend_mwclient(),move_mwclient()Documentation
MWCLIENT_REFACTOR_REPORT.mdwith full analysis of replaceable functionsUsage
All methods use
_mwclientsuffix. Backwards compatibility preserved.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
ar.wikipedia.org/usr/bin/python python -m pytest tests/test_MainPage.py -v --no-header(dns block)/usr/bin/python python -m pytest -v --no-header --ignore=tests/unit/api_utils/bot_edit/bot_edit_by_time/(dns block)/usr/bin/python python -m pytest tests/test_MainPage.py tests/test_ALL_APIS.py -v --no-header(dns block)mdwiki.org/usr/bin/python python -m pytest -v --no-header --ignore=tests/unit/api_utils/bot_edit/bot_edit_by_time/(dns block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.