{"id":15675087,"url":"https://github.com/dotnize/moodle-scrape","last_synced_at":"2026-03-15T09:44:05.193Z","repository":{"id":65572623,"uuid":"530725309","full_name":"dotnize/moodle-scrape","owner":"dotnize","description":"Easily scrape data from Moodle LMS sites","archived":false,"fork":false,"pushed_at":"2023-08-25T12:14:45.000Z","size":28,"stargazers_count":15,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-01T17:11:47.819Z","etag":null,"topics":["javascript","lms","moodle","moodle-scrape","moodle-scraper","nodejs","scraper","web-scraper","webscraper"],"latest_commit_sha":null,"homepage":"https://moodle-scrape.nize.foo","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/dotnize.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,"governance":null}},"created_at":"2022-08-30T15:47:58.000Z","updated_at":"2024-11-22T01:34:03.000Z","dependencies_parsed_at":"2023-08-25T13:00:53.591Z","dependency_job_id":null,"html_url":"https://github.com/dotnize/moodle-scrape","commit_stats":null,"previous_names":["nizefoo/moodle-scrape","99nize/moodle-scrape","ntampus/moodle-scrape","dotnize/moodle-scrape"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnize%2Fmoodle-scrape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnize%2Fmoodle-scrape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnize%2Fmoodle-scrape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnize%2Fmoodle-scrape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnize","download_url":"https://codeload.github.com/dotnize/moodle-scrape/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252788376,"owners_count":21804280,"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":["javascript","lms","moodle","moodle-scrape","moodle-scraper","nodejs","scraper","web-scraper","webscraper"],"created_at":"2024-10-03T15:56:12.925Z","updated_at":"2026-03-15T09:44:05.139Z","avatar_url":"https://github.com/dotnize.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# moodle-scrape\n\n[![NPM](https://nodei.co/npm/moodle-scrape.png)](https://www.npmjs.com/package/moodle-scrape)\u003cbr\u003e\n[![Docs](https://img.shields.io/github/actions/workflow/status/99nize/moodle-scrape/static.yml?branch=main\u0026label=docs\u0026logo=github)](https://moodle-scrape.nize.foo)\u003cbr\u003e\nEasily scrape data from Moodle sites. Tested on Moodle v3.8.\n\n### Features:\n\n- [x] user info\n- [x] courses\n- [x] tasks/deadlines/events\n- [ ] course files/resources ([#1](https://github.com/99nize/moodle-scrape/issues/1))\n\n# Installation\n\n```sh\nnpm install moodle-scrape\n```\n\n```js\nconst { Moodle } = require(\"moodle-scrape\"); // CommonJS\n// or\nimport { Moodle } from \"moodle-scrape\"; // ESM\n```\n\n# Usage\n\n```js\nconst moodle = new Moodle(fetch, \"https://examplesite.com\");\n\nawait moodle.login(\"supercoolusername\", \"superCoolpassword123\");\n// returns true if login was successful\n\nconsole.log(moodle.user.name); // string\nconsole.log(moodle.courses); // array of course objects\nconsole.log(moodle.tasks); // array of task objects\n```\n\nor view the [example](example/index.js) CommonJS script\n\n### Scraping manually\n\nAfter calling `.login()`, the `cookies` property gets filled with a string containing your cookies which you can pass to your own fetch method. For example:\n\n```js\nawait moodle.login(\"username\", \"password\");\n\nconst res = await fetch(\"https://examplesite.com\", {\n  headers: { cookie: moodle.cookies },\n});\n// ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnize%2Fmoodle-scrape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnize%2Fmoodle-scrape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnize%2Fmoodle-scrape/lists"}