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,