From 629edc2b79ba94125ade2d5c7414dd6b3df0563f Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 8 Oct 2005 05:18:47 +0000 Subject: [PATCH] No token for MediaWiki 1.3.x --- mediawikibot.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mediawikibot.rb b/mediawikibot.rb index eacd92e..121d624 100755 --- a/mediawikibot.rb +++ b/mediawikibot.rb @@ -151,7 +151,10 @@ class WikiBot token_page = @client.get_content(url_edit(title)) # FIXME: Uahh. time = token_page.scan(/value="(.*?)" name="wpEdittime" /)[0][0] - token = token_page.scan(/value="(.*?)" name="wpEditToken" /)[0][0] + # No token for MediaWiki 1.3.x + if token_page =~ /wpEditToken/ + token = token_page.scan(/value="(.*?)" name="wpEditToken" /)[0][0] + end post_form(url_edit_submit(title), { "wpTextbox1" => body, "wpSummary" => summary,