{"id":21392338,"url":"https://github.com/hiyali/node-crawler-on-mongodb","last_synced_at":"2025-07-13T18:31:16.402Z","repository":{"id":84520030,"uuid":"94746401","full_name":"hiyali/node-crawler-on-mongodb","owner":"hiyali","description":"🕷  NodeJS + Puppeteer crawler on MongoDB","archived":false,"fork":false,"pushed_at":"2020-09-05T04:15:53.000Z","size":2233,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"youtube-music","last_synced_at":"2025-04-07T15:52:34.187Z","etag":null,"topics":["crawler","example","mongob","nodejs","puppeteer"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hiyali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"hiyali","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-06-19T07:01:49.000Z","updated_at":"2021-03-26T04:14:49.000Z","dependencies_parsed_at":"2023-03-02T04:30:35.593Z","dependency_job_id":null,"html_url":"https://github.com/hiyali/node-crawler-on-mongodb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hiyali/node-crawler-on-mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiyali%2Fnode-crawler-on-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiyali%2Fnode-crawler-on-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiyali%2Fnode-crawler-on-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiyali%2Fnode-crawler-on-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiyali","download_url":"https://codeload.github.com/hiyali/node-crawler-on-mongodb/tar.gz/refs/heads/youtube-music","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiyali%2Fnode-crawler-on-mongodb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265186544,"owners_count":23724688,"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":["crawler","example","mongob","nodejs","puppeteer"],"created_at":"2024-11-22T13:40:03.835Z","updated_at":"2025-07-13T18:31:15.934Z","avatar_url":"https://github.com/hiyali.png","language":"JavaScript","funding_links":["https://github.com/sponsors/hiyali"],"categories":[],"sub_categories":[],"readme":"# Node Puppeteer Crawler\n\n\u003e This is an example for NodeJS \u0026 Puppeteer Crawler on MongoDB with crawling playlists of youtube music\nCrawl all (ALMOST) songs' information of declared playlists in youtube music\n\n### Has features below (and more actually):\n\n* Nodejs + Puppeteer crawler\n  * Simple queue\n  * Perfect SPA crawling\n  * Can crawl multiple sites\n    - Just focus on one site\n* Data management API\n* Mongo Saving\n  * Simple DB Api\n\n## Requirement\n\n* MongoDB (3.2 +)\n* NodeJS (8.0.0 +) - (Npm)\n\n## Usage\n\n### 1. Start Mongodb service\n```shell\n./src/sh/mongodb_serv.sh # not tested recently\n```\n\n### 2. Start crawling, server running on port 5556\n```shell\nnpm start\n```\n\n### 3. Exist APIs\n\n```java\n/api/music # (get) get all data, Pagination: ?skip=10\u0026limit=20\u0026sort={\"price\":-1} , etc. skip = page * limit\n/api/music?title=If I were a boy\u0026artist=adele # (get) query\n/api/music # (post, Content-Type: application/json, []) save multiple results\n/api/music/:id # (get) get one item with mongodb _ID\n/api/music/:id # (delete) delete on item with mongodb _ID\n/api/music # (put) put all data status: 1, can use like this for other column $set={\"status\":2}\n/api/music/:id # (put) put one record status: 1, could use like this $set={\"status\":2} for other columns\n```\n\n### 4. For daily jobs\n```shell\n./src/sh/crawl.sh # tested recently many times\n```\n\n## dev\n\ntarget config folder src/targets-config/*\n\n(crawl/api/custom command was tested)\n```shell\nnpm run api # Just run API\nnpm run crawl # Run targets\nnpm run crawl:dev # Run dev targets (src/targets-config/*.dev.js)\nnpm run custom # Run custom.js\nnpm run example # Run example.back.js, will not save datas\nnpm run start # Run API \u0026 Crawl\n```\n\n## Paramsters on using\n\n* ./node_modules/babel-cli/bin/babel-node.js ./src/** --**\n```shell\n--dont-save-data # wo'nt save data\n--dev-mode # Just run *.dev.js and will restrict crawl times\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiyali%2Fnode-crawler-on-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiyali%2Fnode-crawler-on-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiyali%2Fnode-crawler-on-mongodb/lists"}