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 to Stephane Daury Cancel reply

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