Skip to content

Comment on Get a Packt Pub book a day for free

Comments

This is pretty neat, but I wonder why not download an epub or pdf version of the book right away as well:

  var downloadurl = 'https://www.packtpub.com/ebook_download/'+getBookUrl.split('/')[2]+'/epub';
  request(downloadurl)
    .pipe(require('fs')
      .createWriteStream('./books/book_'+getBookUrl.split('/')[2]+'.epub'));
Oh and btw, for those not aware of this yet, if you use gmail, you can use example+spam@gmail.com and it will arrive in your inbox, but more easy to label as spam and auto-delete if they start spamming.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.