{"_id":"@amedellin85/xvideos-api","name":"@amedellin85/xvideos-api","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@amedellin85/xvideos-api","description":"xvideos.com api implementation.","version":"1.0.0","main":"index.js","license":"BSD-3-Clause","repository":{"type":"git","url":"git+https://github.com/amedelling/xvideos-api.git"},"keywords":["crawler","porn","spider","scrapper","api","xvideos","api","library"],"scripts":{"eslint":"eslint . --ext .js","test":"cross-env NODE_ENV=test mocha --exit lib/**/*.spec.js","coverage":"nyc --reporter=html --reporter=lcov npm test"},"dependencies":{"axios":"^0.21.4","cheerio":"^1.0.0-rc.10","puppeteer":"^8.0.0"},"devDependencies":{"chai":"^4.3.4","codeclimate-test-reporter":"^0.5.1","cross-env":"^7.0.3","eslint":"^7.23.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.22.1","mocha":"^9.1.4","nyc":"^15.1.0"},"engines":{"node":">=7.6.0"},"bugs":{"url":"https://github.com/amedelling/xvideos-api/issues"},"homepage":"https://github.com/amedelling/xvideos-api#readme","directories":{"lib":"lib"},"author":{"name":"AdrianMedellin"},"_id":"@amedellin85/xvideos-api@1.0.0","contributors":[{"name":"Rodrigo Gomes da Silva","email":"rodrigo.gomes@involves.com.br","url":"https://github.com/rodrigogs"},{"name":"Tiago Ribeiro","email":"tiagoribeiro.1803@gmail.com","url":"https://github.com/Ribeiro-Tiago"}],"gitHead":"9bca98093e61511f58d64766f9638901ef49c290","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-TWH3z7hhKusziB508wSyAir8yBzohaUG2Lfw9fMPjRhE5YO4vin0kx8hNx/OQadOYeZyO8+TXyuROh4ovyLdhQ==","shasum":"acf04f4e437ef82ce1be1b24eb2b22e6ba10725c","tarball":"https://registry.npmjs.org/@amedellin85/xvideos-api/-/xvideos-api-1.0.0.tgz","fileCount":72,"unpackedSize":63096,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEVgSryG5b5oCm+h5tSDwCG2qRjIcZ17saPqETTZZftoAiEA/gNr5qfdvbj6lH70vvQjPUatxj8lbN2QIQSVWjZ7/Lo="}]},"_npmUser":{"name":"amedellin85","email":"adrian.medellin.garcia@hotmail.com"},"maintainers":[{"name":"amedellin85","email":"adrian.medellin.garcia@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xvideos-api_1.0.0_1708109890403_0.1439038065248337"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-16T18:58:10.282Z","1.0.0":"2024-02-16T18:58:10.598Z","modified":"2024-02-16T18:58:11.163Z"},"maintainers":[{"name":"amedellin85","email":"adrian.medellin.garcia@hotmail.com"}],"description":"xvideos.com api implementation.","homepage":"https://github.com/amedelling/xvideos-api#readme","keywords":["crawler","porn","spider","scrapper","api","xvideos","api","library"],"repository":{"type":"git","url":"git+https://github.com/amedelling/xvideos-api.git"},"contributors":[{"name":"Rodrigo Gomes da Silva","email":"rodrigo.gomes@involves.com.br","url":"https://github.com/rodrigogs"},{"name":"Tiago Ribeiro","email":"tiagoribeiro.1803@gmail.com","url":"https://github.com/Ribeiro-Tiago"}],"author":{"name":"AdrianMedellin"},"bugs":{"url":"https://github.com/amedelling/xvideos-api/issues"},"license":"BSD-3-Clause","readme":"# xvideos\n\nA a [Node.js](https://nodejs.org) [xvideos.com](xvideos.com) API library.\n\n### Install\n```bash\n$ npm install @amedellin85/xvideos-api\n```\n\n### Usage\n```javascript\nconst xvideos = require('@amedellin85/xvideos-api');\n\n//-- Inside an async function --//\n\n// Retrieve fresh videos\nconst fresh = await xvideos.videos.fresh({ page: 1 });\nconsole.log(fresh.videos); // { url, path, title, duration, profile: { name, url }, views, }\nconsole.log(fresh.pagination.current); // 1 \nconsole.log(fresh.pagination.pages); // [1, 2, 3, 4, 5...]\nconsole.log(fresh.hasNext()); // true\nconsole.log(fresh.hasPrevious()); // false\n\nconst nextPage = await fresh.next();\nconsole.log(nextPage.pagination.current); // 2\nconsole.log(nextPage.hasNext()); // true\nconsole.log(nextPage.hasPrevious()); // true\n\nconst previousPage = await fresh.previous();\nconsole.log(previousPage.pagination.current); // 1\nconsole.log(previousPage.hasNext()); // true\nconsole.log(previousPage.hasPrevious()); // tfalse\n\nconst detail = await xvideos.videos.details(fresh.videos[0]); /**\n{\n  title,\n  duration,\n  image,\n  videoType,\n  videoWidth,\n  videoHeigth,\n  views,\n  files: {\n    low,\n    high,\n    HLS,\n    thumb,\n    thumb69,\n    thumbSlide,\n    thumbSlideBig\n  }\n} **/\n```\n\n### API\n* Retrieve [dashboard videos](https://www.xvideos.com)\n  ```javascript\n  const dashboardList = await xvideos.videos.dashboard({ page: 1 });\n  ```\n  * Is there a next page? \n    ```javascript\n    console.log(deshboardList.hasNext()); // true or false\n    ```\n  * Is there a previous page? \n    ```javascript\n    console.log(deshboardList.hasPrevious()); // true or false\n    ```\n  * Refresh page videos\n    ```javascript\n    const refreshedVideos = await deshboardList.refresh();\n    ```\n  * Retrieve next deshboard page videos \n    ```javascript\n    const nextVideos = await deshboardList.next();\n    ```\n  * Retrieve previous deshboard page videos\n    ```javascript\n    const previousVideos = await deshboardList.previous();\n    ```\n* Retrieve [fresh videos](https://www.xvideos.com/new/1)\n  ```javascript\n  const freshList = await xvideos.videos.fresh({ page: 1 });\n  ```\n  * Is there a next page? \n    ```javascript\n    console.log(freshList.hasNext()); // true or false\n    ```\n  * Is there a previous page? \n    ```javascript\n    console.log(freshList.hasPrevious()); // true or false\n    ```\n  * Refresh page videos \n    ```javascript\n    const refreshedVideos = await freshList.refresh();\n    ```\n  * Retrieve next fresh page videos \n    ```javascript\n    const nextVideos = await freshList.next();\n    ```\n  * Retrieve previous fresh page videos\n    ```javascript\n    const previousVideos = await freshList.previous();\n    ```\n* Retrieve [best videos](https://www.xvideos.com/best)\n  ```javascript\n  const bestList = await xvideos.videos.best({ year: '2018', month: '02', page: 1 });\n  ```\n  * Is there a next page? \n    ```javascript\n    console.log(bestList.hasNext()); // true or false\n    ```\n  * Is there a previous page? \n    ```javascript\n    console.log(bestList.hasPrevious()); // true or false\n    ```\n  * Refresh page videos \n    ```javascript\n    const refreshedVideos = await bestList.refresh();\n    ```\n  * Retrieve next best page videos \n    ```javascript\n    const nextVideos = await bestList.next();\n    ```\n  * Retrieve previous best page videos\n    ```javascript\n    const previousVideos = await bestList.previous();\n    ```\n* Retrieve [verified videos](https://www.xvideos.com/verified/videos)\n  ```javascript\n  const verifiedList = await xvideos.videos.verified({ page: 1 });\n  ```\n  * Is there a next page? \n    ```javascript\n    console.log(verifiedList.hasNext()); // true or false\n    ```\n  * Is there a previous page? \n    ```javascript\n    console.log(verifiedList.hasPrevious()); // true or false\n    ```\n  * Refresh page videos \n    ```javascript\n    const refreshedVideos = await verifiedList.refresh();\n    ```\n  * Retrieve next verified page videos \n    ```javascript\n    const nextVideos = await verifiedList.next();\n    ```\n  * Retrieve previous verified page videos\n    ```javascript\n    const previousVideos = await verifiedList.previous();\n    ```\n* Retrieve [video details](https://www.xvideos.com/video36638661/chaturbate_lulacum69_30-05-2018)\n  ```javascript\n  const details = await xvideos.videos.details({ url: 'https://www.xvideos.com/video36638661/chaturbate_lulacum69_30-05-2018' });\n  ```\n\n* Filter [videos](https://www.xvideos.com/?k=threesome)\n  ```javascript\n  const videos = await xvideos.videos.search({ k: 'threesome' });\n  const videos = await xvideos.videos.search({ k: 'public', page: 5 });\n  ```\n  * Is there a next page? \n    ```javascript\n    console.log(videos.hasNext()); // true or false\n    ```\n  * Is there a previous page? \n    ```javascript\n    console.log(videos.hasPrevious()); // true or false\n    ```\n  * Refresh page videos \n    ```javascript\n    const refreshedVideos = await videos.refresh();\n    ```\n  * Retrieve next verified page videos \n    ```javascript\n    const nextVideos = await videos.next();\n    ```\n  * Retrieve previous verified page videos\n    ```javascript\n    const previousVideos = await videos.previous();\n    ```\n\n### License\n[Licence](https://github.com/AdrianMedellinG/xvideos-api/blob/main/LICENSE) © Adrian Medellin\n#","readmeFilename":"README.md"}