Hacker News new | ask | show | jobs
by lawry 4027 days ago
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.