Posted by Anonymous on Thu 3rd Dec 01:33 (modification of post by view diff)
download | new post
- agent = WWW::Mechanize.new
- # login
- page = agent.get 'http://lania.de/utopia/index.php'
- form = page.forms.select { |form| form.action == "http://lania.de/utopia/index.php?action=login2" }.first
- form.user, form.passwrd = USERNAME, PASSWORD
- page = agent.submit form, form.buttons.first
- # modify topic
- page = agent.get "http://lania.de/utopia/index.php?topic=#{TOPIC}"
- page = agent.click page.links.select { |link| link.text == 'Modify' }.first
- form = page.form 'postmodify'
- form.message = text
- page = agent.submit form, form.buttons.first
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.