{"id":28641024,"url":"https://github.com/dotcs/coursera-capture-solutions","last_synced_at":"2025-06-12T20:36:42.112Z","repository":{"id":42861515,"uuid":"259711171","full_name":"dotcs/coursera-capture-solutions","owner":"dotcs","description":"Quick and dirty CLI tool to capture assignments solutions from Coursera courses.","archived":false,"fork":false,"pushed_at":"2022-03-26T14:51:55.000Z","size":600,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-04-14T23:10:11.572Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotcs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-28T17:51:50.000Z","updated_at":"2020-09-08T20:18:01.000Z","dependencies_parsed_at":"2022-09-03T08:11:42.992Z","dependency_job_id":null,"html_url":"https://github.com/dotcs/coursera-capture-solutions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dotcs/coursera-capture-solutions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Fcoursera-capture-solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Fcoursera-capture-solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Fcoursera-capture-solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Fcoursera-capture-solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotcs","download_url":"https://codeload.github.com/dotcs/coursera-capture-solutions/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Fcoursera-capture-solutions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259522778,"owners_count":22870551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-12T20:36:39.952Z","updated_at":"2025-06-12T20:36:42.104Z","avatar_url":"https://github.com/dotcs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coursera: Screenshots of Quizzes and Assignments\n\nQuick and dirty CLI tool to capture assignments solutions from Coursera courses.\n\n## Why? \n\nIf you are like me you love Coursera and their online courses.\nBecause you love them you probably do **a lot of them**.\nYou might be interested in keeping a copy of your quizzes and assignments next to your certificates for future reference.\n\nThis repository contains code to create full-page screenshots from courses which is hard to do because of the HTML page layout that coursera has been chosen for quizzes and assignments.\n\nThis tool uses [puppeteer](https://github.com/puppeteer/puppeteer/) to discover, fetch and manipulate the solution pages and then take full-screen snapshots of them.\n\n## Get started\n\nI'll use conda to setup a node environment.\nYou can also use [nvm](https://github.com/nvm-sh/nvm) or your default node environment - whatever you like.\nJust leave out the conda steps in those cases.\n\n```bash\nconda create -p ./.conda-env nodejs\nconda activate ./.conda-env\n\n# sanity check\nwhich node   # should point to the node executable in the .conda-env folder\n```\n\nInstall all node dependencies:\n\n```bash\nnpm install\nnpm link      # symlink executable as ccs\n```\n\n## Download solutions for a given course\n\n### Authentication\n\nTo authenticate against Coursera's webservers please copy the `CAUTH` cookie value.\nTo do so go to [the Coursera website](https://coursera.org) and perform the following steps:\n\n1. Login with your credentials\n1. Open the developer tools (Shortcut: `Ctrl + Shift + i`)\n1. Go to Storage -\u003e Cookies and search for a cookie with the name `CAUTH`\n4. Copy the value to your clipboard\n\nNow export this value in a terminal as a variable with the name `CAUTH`:\n\n```bash\nexport CAUTH=\"your value goes here\"\n```\n\n**Note**: Be careful where to copy and paste this token.\nThe token is identical to your username/password combination and should NEVER be published to any site, blog, git, Facebook, whatever. NEVER. EVER!\n\n### Use the CLI tool\n\nLet's assume you have finished the course [Introduction to Data Science in Python](https://www.coursera.org/learn/python-data-analysis/home/welcome) and you want to download all your solutions.\nHave a look at the URL: https://www.coursera.org/learn/python-data-analysis/home/welcome.\nThe part between `learn/` and `/home`, in this case `python-data-analysis`, is the course ID which will be required in the next step.\n\nDownloading the solutions is a simple call\n\n```bash\nccs --courseId python-data-analysis\n\n# use the courseId flag multiple times for downloading solutions of multiple courses\nccs --courseId python-data-analysis --courseId sql-for-data-science \n```\n\nThe tool will determine all assignments automatically and download your solutions.\nBy default the download directory will be `/tmp/coursera-capture-solutions/$COURSE_ID` (this can be adjusted with the `--outputDir` flag).\nIn this directory you will find a set of PNG files with full-page screenshots of the solution.\n\nA sample solution could look like this (some parts have been blurred, because I don't want to spoiler all solutions ;) ).\n\n\u003cimg src=\"assets/sample-screenshot.png\" /\u003e\n\nHave fun!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotcs%2Fcoursera-capture-solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotcs%2Fcoursera-capture-solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotcs%2Fcoursera-capture-solutions/lists"}