[RndTbl] Free e-books
Sean Walberg
sean at ertw.com
Wed Sep 9 12:53:47 CDT 2015
#!/bin/env ruby
require 'mechanize'
a = Mechanize.new { |agent| agent.user_agent_alias = 'Mac Safari' }
a.get('https://www.packtpub.com/packt/offers/free-learning') do |page|
logged_in = page.form_with(id: 'packt-user-login-form') do |l|
l.email = 'YOURACCOUNT'
l.password = 'YOURPASSWORD'
end.submit
get_book = a.click(logged_in.link_with(class: 'twelve-days-claim'))
end
On Wed, Sep 9, 2015 at 1:09 PM, Gilbert E. Detillieux <
gedetil at cs.umanitoba.ca> wrote:
> Someone mentioned a web site offering a different free e-book each day, on
> various tech topics. Here's the correct URL for the site...
>
> https://www.packtpub.com/packt/offers/free-learning
>
> Enjoy!
>
> --
> Manitoba UNIX User Group E-mail: <gedetil at muug.mb.ca>
> c/o Gilbert E. Detillieux Web: http://www.muug.mb.ca/
> University of Manitoba Phone: (204)474-8161
> Winnipeg MB CANADA R3T 2N2 Fax: (204)474-7609
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.mb.ca
> http://www.muug.mb.ca/mailman/listinfo/roundtable
>
--
Sean Walberg <sean at ertw.com> http://ertw.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.muug.mb.ca/pipermail/roundtable/attachments/20150909/70fd765d/attachment.html>
More information about the Roundtable
mailing list