简体   繁体   中英

Wikipedia API how to use it to edit content

I have a problem, someone sabotaged some pages on Wikipedia by redacting content. Is it possible to check the specific paragraph that content was changed in and restore it?

I can't understand your question. But as the title shows, you may want to edit a wiki page via API. so... this may help you:

$page = new Article(Title::newFromText('PageName'));
$status = $page->doEdit($body_text, 'message.', EDIT_UPDATE);

And if you want to revert to a prior revision of an article, you may read the docs about Rollback API of Mediawiki.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM