title: How to use Google application-specific password in script?
body: <p>Since enabling 2-factor authentication (aka. 2-step verification) on Google, my <a href="https://github.com/l0b0/export" rel="nofollow noreferrer">Google export scripts</a> no longer work. The computer is verified and trusted, but somehow the scripts are not. In effect, every time the cron job is run I receive a new "Google verification code" and the script fails. I assume it should be a simple matter to authenticate such scripts once and for all with <code>wget</code> or <code>curl</code>, but I couldn't find any documentation for how to do it.</p>
  
  <hr>
  
  <p>Google authentication schemes have gone through many iterations, and I can no longer seem to log in using <code>curl</code> or <code>mechanicalsoup</code>. I've tried using URLs like <code>https://accounts.google.com/ServiceLogin?continue=https://calendar.google.com/calendar/exporticalzip&amp;Email=username@gmail.com&amp;Passwd=application-specific-password</code>, and I always get redirected to a login page, usually with the message "Please use your account password instead of an application-specific password."</p>