One thought on “My road-trip mix tape

  1. #!/usr/bin/ruby
    
    require 'rubygems'
    require 'mechanize'
    require 'pp'
    
    service_username = "the user"
    service_password = 'the password'
    
    agent = WWW::Mechanize.new
    
    agent.user_agent_alias = 'Mac Safari'
    
    page = agent.get('https://my.101domain.com/')
    
    form = page.forms[3]
    form.fields.name("username").value = service_username
    form.fields.name("password").value = service_password
    result = agent.submit form
    
    agent.get("https://my.101domain.com/domain/export.csv").save_as("/home/epsi/tmp/rubyexport.csv")
    
    agent.get('https://my.101domain.com/?logout')
    

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.