{"analyzedAt":"2022-07-07T15:00:50.157Z","collected":{"metadata":{"name":"node-raspar","scope":"unscoped","version":"1.2.6","description":"Easily scrap the web for torrent and media files.","keywords":["music","api","download","search","torrent","mp3","mp4","video","scraping","crawling","spider","free","nodejs","lossless","EDM","instrumentals","beats","node"],"date":"2022-04-22T14:52:18.529Z","author":{"name":"Lawrence Onah","email":"paplow01@gmail.com","username":"kodjunkie"},"publisher":{"username":"kodjunkie","email":"paplow01@gmail.com"},"maintainers":[{"username":"kodjunkie","email":"paplow01@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/kodjunkie/node-raspar.git"},"links":{"npm":"https://www.npmjs.com/package/node-raspar"},"license":"MIT","dependencies":{"cache-manager":"^3.6.1","cache-manager-fs-hash":"0.0.9","commander":"^2.20.3","express":"^4.17.3","express-validator":"^6.14.0","jquery":"^3.6.0","puppeteer":"^13.6.0","puppeteer-extra":"^3.2.3","puppeteer-extra-plugin-adblocker":"^2.12.0","puppeteer-extra-plugin-anonymize-ua":"^2.3.3","puppeteer-extra-plugin-stealth":"^2.9.0","swagger-jsdoc":"^6.2.0","swagger-ui-express":"^4.3.0"},"devDependencies":{"@types/jest":"^26.0.24","eslint":"^7.32.0","eslint-config-prettier":"^8.5.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.4.1","jest":"^27.5.1","prettier":"^2.6.2"},"releases":[{"from":"2022-06-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2022-04-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":3},{"from":"2022-01-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":3},{"from":"2021-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":17},{"from":"2020-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":19}],"hasTestScript":true,"readme":"<div align=\"center\">\n\n<h1>Node Raspar 🕷️</h1>\n\nEasily scrap the web for torrent and media files.\n\n[![downloads](https://img.shields.io/npm/dt/node-raspar.svg)](https://www.npmjs.com/package/node-raspar) [![raspar CI](https://github.com/kodjunkie/node-raspar/actions/workflows/node.js.yml/badge.svg?branch=master)](https://github.com/kodjunkie/node-raspar/actions/workflows/node.js.yml) <a href=\"https://github.com/kodjunkie/node-raspar/blob/master/LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-yellow.svg\" alt=\"License: MIT\" height=\"20\"></a>\n\n</div>\n\n## Getting Started\n\n> Raspar exports a resolver function which accepts the configuration object as an argument and returns promises for all available methods.\n\n### Installation\n\nTo use Raspar in your project, run:\n\n```bash\nnpm i node-raspar\n```\n\n### Usage\n\nRaspar follows the latest [maintenance LTS](https://github.com/nodejs/Release#release-schedule) version of Node and v14.x or greater is recommended.\n\n#### Configuration\n\n**NOTE:** You can use any promise based cache store engine from this [list](https://github.com/BryanDonovan/node-cache-manager#store-engines), raspar uses [fs-hash](https://github.com/rolandstarke/node-cache-manager-fs-hash) by default.\n\n```javascript\nconst options = {\n\tdriver: \"1337x\", // default: zippyshare\n\tperPage: 12, // results per page (default: 10)\n\tcache: { options: { ttl: 60 * 8 } }, // to disable caching set to \"false\"\n};\n```\n\n**Example 1** - get a list of music files (using the `zippyshare` driver)\n\n```javascript\n// initialize by passing a custom options\n// or leave empty for default\nconst raspar = require(\"node-raspar\")(options);\n\n// when using zippyshare driver\n// you need to pass a genre as the second argument to the list method\n// calling it without passing the genre returns a list of available genres\nconst page = 1;\nconst genre = \"Hip Hop\";\n\nraspar.list(page, genre).then(console.log).catch(console.error);\n```\n\n**Example 2** - search for torrent files (using the `1337x` driver)\n\n```javascript\nconst raspar = require(\"node-raspar\")(options);\n\n(async () => {\n\tconst page = 1;\n\tconst keyword = \"avengers\";\n\n\tconst results = await raspar.search(keyword, page);\n\tconsole.log(results);\n})();\n```\n\n## Available Drivers and Methods\n\n| Drivers    | Type      | Search (query, page) | List (page)        |\n| ---------- | --------- | -------------------- | ------------------ |\n| Zippyshare | `Music`   | :white_check_mark:   | :white_check_mark: |\n| 1337x      | `Torrent` | :white_check_mark:   | :white_check_mark: |\n| Netnaija   | `Movie`   | :white_check_mark:   | :white_check_mark: |\n| Zoro       | `Anime`   | :white_check_mark:   | :white_check_mark: |\n\n## Running / Deploying the API\n\nThis is the first step if you're trying to either run it with or without using `docker`\nIn terminal run the following commands to get the code on your machine.\n\n```bash\n# first clone the repo\n$ git clone https://github.com/kodjunkie/node-raspar.git raspar\n# change directory\n$ cd raspar\n# chmod the cache directory\n$ sudo chmod -R 777 temp/\n```\n\n### Without Docker\n\nRun these additional commands\n\n```bash\n# install dependencies\n$ npm install\n# start the server\n$ npm start\n```\n\n### With Docker\n\nRun these additional commands\n\n```bash\n# build the container\n$ docker build -t raspar-api .\n# run the container mapping the ports\n$ docker run --name raspar -it -p 3000:3000 raspar-api\n```\n\n### With Docker Compose\n\nRun these additional commands\n\n```bash\n# to boot-up first time only\n# or whenever docker file is modified (builds the container)\n$ docker compose up --build\n# to boot-up without building the container (regular use)\n$ docker compose up\n# to shut-down\n$ docker compose down\n\n# Solutions to problems you might encounter with docker compose\n#\n# NOTE: Before you run any of the solutions below, you first need access to the rasper shell.\n# to gain access to the shell, open a new terminal window and run\n$ docker exec -it raspar bash\n#\n# to exit raspar shell, run (optional)\n$ exit\n#\n# Problem 1: you might get module loading errors\n# once in the raspar shell, run\n$ npm install\n#\n# Problem 2: you might get \"Could not locate (chrome) locally\" error\n# this happens when npm doesn't run puppeteer's post install script successfully\n# once in the raspar shell, run\n$ node ./node_modules/puppeteer/install.js\n```\n\n### Deploying on Heroku\n\nHeroku requires some additional dependencies that aren't included on the Linux box that Heroku spins up for you.\nTo add the dependencies on deploy, add the Puppeteer Heroku buildpack to the list of buildpacks for your app under Settings > Buildpacks.\n\nThe url for the buildpack is `https://github.com/CoffeeAndCode/puppeteer-heroku-buildpack`\n\n## API Documentation\n\n**NOTE:** `localhost` refers to the address your server is running on. By default, it runs on port `3000`\n\n**Swagger:** [http://localhost:3000/docs](http://localhost:3000/docs)\n\n## Liked it?\n\nHope you liked this project, don't forget to give it a star ⭐\n\n<div align=\"center\">\n  <a href=\"https://starchart.cc/kodjunkie/node-raspar\">\n    <img src=\"https://starchart.cc/kodjunkie/node-raspar.svg\" width=\"600px\">\n  </a>\n</div>\n\n## Tests\n\n```bash\n$ npm test\n\n# or via docker\n$ docker exec -it raspar npm test\n```\n\n## License\n\nThis project is opened under the [MIT 2.0 License](https://github.com/kodjunkie/node-raspar/blob/master/LICENSE) which allows very broad use for both academic and commercial purposes."},"npm":{"downloads":[{"from":"2022-07-06T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2022-06-30T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":1},{"from":"2022-06-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":56},{"from":"2022-04-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":361},{"from":"2022-01-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":567},{"from":"2021-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":1695}],"starsCount":0},"github":{"starsCount":4,"forksCount":2,"subscribersCount":1,"issues":{"count":78,"openCount":0,"distribution":{"3600":77,"10800":0,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":1,"23619600":0,"70858800":0,"212576400":0},"isDisabled":false},"contributors":[{"username":"kodjunkie","commitsCount":183}],"commits":[{"from":"2022-06-30T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2022-06-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2022-04-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":35},{"from":"2022-01-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":35},{"from":"2021-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":119}]},"source":{"files":{"readmeSize":5426,"testsSize":3113,"hasNpmIgnore":true},"badges":[{"urls":{"original":"https://img.shields.io/npm/dt/node-raspar.svg","shields":"https://img.shields.io/npm/dt/node-raspar.svg","content":"https://img.shields.io/npm/dt/node-raspar.json"},"info":{"service":"npm","type":"downloads","modifiers":{"type":"dt"}}}],"linters":["eslint","prettier"],"outdatedDependencies":{"cache-manager-fs-hash":{"required":"0.0.9","stable":"1.0.0","latest":"1.0.0"},"cache-manager":{"required":"^3.6.1","stable":"4.0.1","latest":"4.0.1"},"puppeteer":{"required":"^13.6.0","stable":"15.3.1","latest":"15.3.1"},"commander":{"required":"^2.20.3","stable":"9.3.0","latest":"9.3.0"}}}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.6,"health":0.5,"branding":0.15},"popularity":{"communityInterest":8,"downloadsCount":120.33333333333333,"downloadsAcceleration":-1.0677511415525116,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9369006849315069,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":1}},"score":{"final":0.6258344954692563,"detail":{"quality":0.8729443032880405,"popularity":0.03986058423669744,"maintenance":1}}}