- webpage = self._download_webpage(self._PACKT_BASE, None)
- login_form = self._form_hidden_inputs(
- 'packt-user-login-form', webpage)
- login_form.update({
- 'email': username,
- 'password': password,
- })
- self._download_webpage(
- self._PACKT_BASE, None, 'Logging in as %s' % username,
- data=urlencode_postdata(login_form))