Coursera-dl HTTPError: 400

HTTPError: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

Solution

Assumptions

  1. If you are downloading https://www.coursera.org/learn/[CLASS-NAME]/home/info For example: class home: https://www.coursera.org/learn/cloud-infrastructure-design-process/home/info Here [CLASS-NAME] = cloud-infrastructure-design-process

  2. Obtain CAUTH token for the course

    • Navigate to the class home

    • Right click > Inspect element

    • Select Application

    • Take note of the CAUTH

CAUTH token

Snippet

# General command
coursera-dl -ca 'CAUTH' [CLASS-NAME]
# Example
coursera-dl -ca 't7OlopZp-vgTjHpFalsljlskfdlfakf' cloud-infrastructure-design-process

References