Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to backup pages using API:Query instead of Special:Export #280

Closed
wants to merge 2 commits into from

Conversation

NyaMisty
Copy link

@NyaMisty NyaMisty commented Oct 5, 2016

Since Special:Export page is using a huge bandwidth, some wiki sites have closed this page, making unable to dump without shell access. However they still accept API requests, so I hacked the script to achieve that. Hope helpful!
PS: using --apiexport can query pages through API.

Add support to backup using only API instead of Special:Export
Merge Changes
@nemobis
Copy link
Member

nemobis commented May 22, 2018

Thanks. Sorry for the long silence: this is important but only now I've had the occasion to test this in real life. We're especially concerned about keeping the XML as similar as possible to the traditional one and to the schema (which however may not be possible with this approach).

I've tried a streamlined allrevisions approach for MediaWiki 1.27+ wikis, which I've had in mind for a while, and then I added one based on the allpages/allrevisions API, like yours. #311

Now I'll compare the two approaches and see how to "merge" them.

@NyaMisty
Copy link
Author

Thanks. I've only tested this script on two sites: zh.moegirl.org and hmoegirl.com.
And the generated format is consistent with the original script :)
But seems that the API interfaces of some wiki are not working correctly. Since you've tested your script in a greater scale of sites, I'll close my pr now.

@NyaMisty NyaMisty closed this May 23, 2018
GERZAC1002 added a commit to GERZAC1002/wikiteam that referenced this pull request Apr 11, 2022
Add support to backup pages using API:Query instead of Special:Export
WikiTeam#280

into recent version of dumpgenerator.py

Adds additional parameter: --apiexport
which uses a query request instead of submit on api.php which works
without Special:Export which is disabled on some sites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants