jenkins-bot has submitted this change and it was merged.

Change subject: use the core method page.text and page.save() for the sample
......................................................................


use the core method page.text and page.save() for the sample

core introduces the page.text getter/setter method instead of
page.get() and page.put(). We should provide it in this sample.

Change-Id: I25e039839a4661577f9bcd817d1618cdbab69bd4
---
M README.md
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/README.md b/README.md
index 7acbc43..06aed08 100644
--- a/README.md
+++ b/README.md
@@ -23,9 +23,9 @@
 import pywikibot
 site = pywikibot.Site('en', 'wikipedia')  # The site we want to run our bot on
 page = pywikibot.Page(site, 'Wikipedia:Sandbox')
-text = page.get()  # The current text on the page
-text = text.replace('foo', 'bar')
-page.put(text, 'Replacing "foo" with "bar"')  # Saves the page
+text = page.text  # The current text on the page
+page.text = text.replace('foo', 'bar')
+page.save('Replacing "foo" with "bar"')  # Saves the page
 ```
 
 ## Contributing

-- 
To view, visit https://gerrit.wikimedia.org/r/132597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I25e039839a4661577f9bcd817d1618cdbab69bd4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to