{"_id":"4anime","_rev":"3-ca01263ea7015aefd6d64f037af1d3eb","name":"4anime","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.5":{"name":"4anime","version":"0.0.5","description":"A web scraper for 4anime.to","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/sirakberhane/4anime.git"},"author":{"name":"mrgambino"},"license":"ISC","bugs":{"url":"https://github.com/sirakberhane/4anime/issues"},"homepage":"https://github.com/sirakberhane/4anime#readme","dependencies":{"axios":"^0.21.1","cheerio":"^1.0.0-rc.3"},"devDependencies":{"nodemon":"^2.0.4"},"gitHead":"6f2bc0152b09e08965ce92a8b8e3485309b0e46d","_id":"4anime@0.0.5","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-07XR1oSdokRYEYQaFuDe22hFXjshau+nrSDdOZqglhWR0mAjtww+QHvAKit7kgw6Fo1V5lOsD+mQOi6tnrdSLQ==","shasum":"ce34cc07c327a1e4623d9c9935174fda416f360b","tarball":"https://registry.npmjs.org/4anime/-/4anime-0.0.5.tgz","fileCount":6,"unpackedSize":13500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmMTHCRA9TVsSAnZWagAAGL0P/R83PchMvc8mHLVST+AN\n22N7XitTUgBGNzUolWMga1fXxWqwgp2pm5KxK8Ucuk8iE03rnY6IPGI5HtnO\n6aIPdI3O9IgMrWt7ToyEePzo9G5gphPxppHLNsDCCeYDcdm7A77qbi4Z/+34\nTHLGQSHZzbKVi/9YuPTNzQMOJ9BkvfNm0BP1z8v746SDb8G3SH+6rQ8MsEN7\nOkX7a008xP4ooJBTNBDNMC96IIV9sMwclGlTu4sLgivhu+NSTzFxlz9SL3Kz\ntwujZstBH4kcgy/+AZY7mF2BjT1DwL/WWwyJ23VnZtmekH9j7aBDG9ARTeWz\npjNJqwVlFAOkfGpnXFs/pd2Lvd31HGAYqmvNcfL6T86o2+7UJ8lkI0rMEiBX\noZwk62fdVSfCkIDpk+UVG67eRh/BNQitXN0ZjSXPR5ehdYclPilfIYqQBoLR\nbxl5y6mxUhfACz3oHwvoB475t3bUTmBVlYr8yRWoxF+6VDwQScPdtITCQo3t\nOgL1vM1fDz2l5cmwrKmAwy8Vz6exb+A1MZkGo7TVkcC5GPCTHvSjYQgOEKZp\nebs9JaDRKtCGhft83gaXO0tyUD1eEj9Eo1qG4zDYhWhFrDwXWeDWBDYWo6Fy\nzpVbfNOm4D4B+oGhbniGn2/gUTtHIL7bF3dWhXIOmEBLiRJNEQeR6IMMO7mz\n429a\r\n=tWNh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHA7K6SNKtkmtI4JxDx7V4vcFmZbl7+2NjDEPuJCT4KXAiEA1VZhN/NIn7q0528o8VC30b3T1Sr3zO4sKibOiQlCf9o="}]},"_npmUser":{"name":"mrgambino","email":"sirakberhane@cmail.carleton.ca"},"directories":{},"maintainers":[{"name":"mrgambino","email":"sirakberhane@cmail.carleton.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/4anime_0.0.5_1620624583211_0.6290504481036254"},"_hasShrinkwrap":false},"0.0.6":{"name":"4anime","version":"0.0.6","description":"A web scraper for 4anime.to","main":"index.js","scripts":{"test":"node test.js"},"author":{"name":"mrgambino"},"license":"ISC","dependencies":{"axios":"^0.21.1","cheerio":"^1.0.0-rc.3"},"devDependencies":{"nodemon":"^2.0.4"},"gitHead":"d060d6d33ad564f14a80596034c9d67c843b4530","_id":"4anime@0.0.6","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-0tBf0D3cK2jG5kbsyc8kaXUnCZNjM/N3kZLSXTe6QF8FOo+6gE5jJTsCf6VvpRPfa3D4AF3EdliiMoYytRoaQQ==","shasum":"52a41f537f410a880950ffeaadadc0702c9c5dae","tarball":"https://registry.npmjs.org/4anime/-/4anime-0.0.6.tgz","fileCount":6,"unpackedSize":13251,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmMWLCRA9TVsSAnZWagAAxwsP/3lgq2qjziKFzx17KqcC\na/mY8zxZSt09nezSniH8iA8+Oy19t5sEiBK1nkk2fei27BdK4GoXpDVqalXR\nWBkloHf8b0fU+64eLgbDqdtWHSwDgORoP3oMoAU4hZHWsG5Zxy07j5vuerDl\nzixmrkVnJA9qrOxCAjlVgn42A8sLHLIa5BUiDx75OY+uQ/MGLe6qM93dpLkI\nJcbbADVglyM2nuTWhuNjMPhCICvv61OIRjJpai8B2JeibL/Ee1TSA+2QVsmG\nbUU+F2Nz5Vg/CqrdstQdfeMycBmgqiYPzzaI1/tsHprxvVyAzyc4aYH6nZeP\n0i2scqbKvat8iwEqUdhBaMlI/eb/+LSRZT5aLUJI9NLrtnAmSyxPyohf8YEL\n47Y6StMHgtUP11m2C4nw2wm2Q2X1neyKjCxz8qMZ6gcjJUeBxnQzSUpvF3bX\nzddF8fniJm73a4lA3ZWWvFUAp3k5ZBRj7MCFeCgX1u9kMkzxMsxKPZx3ziAk\noJKKFJGsfMVzmusV8eGfvx7P/2nk/PcFN8x71NmWtyIhLPnf3QnMDMt0dcVk\n7lq3L+nT3HbwAvpiEijy0G/7+C1UT602cjEhtofXeqhB16cD70AbsHUfZAVP\nEq4x57hYY5XIs7gX2avH7ybWGkFkascfzJ3Xmy6EXFlT6afwOgWOW1MqYLKJ\nRH1H\r\n=3HoZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA5Gz8JCHi5SYS7/9HP8Lz/Ho7f4mpOKqLhJK0C6iW3HAiEA6EqAMQMQlG1ALtxJ/08QhJyYUncrfEDRs0lBZ14ogek="}]},"_npmUser":{"name":"mrgambino","email":"sirakberhane@cmail.carleton.ca"},"directories":{},"maintainers":[{"name":"mrgambino","email":"sirakberhane@cmail.carleton.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/4anime_0.0.6_1620624779149_0.5557293856390619"},"_hasShrinkwrap":false},"0.0.7":{"name":"4anime","version":"0.0.7","description":"A web scraper for 4anime.to","main":"index.js","scripts":{"test":"node test.js"},"author":{"name":"mrgambino"},"license":"ISC","dependencies":{"axios":"^0.21.1","cheerio":"^1.0.0-rc.3"},"devDependencies":{"nodemon":"^2.0.4"},"gitHead":"34fdc502d7237358763062c0a12c9d6231dad196","_id":"4anime@0.0.7","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-gakTyvzqLFTYzbZzrY6gBX2G4VEorEKUTG9amEC3alSzlP8lAU/XogjwNO3xPy1AphEX4pYExBUKSivF1brsNw==","shasum":"15f9f164f2def7ea65bad54499f8076d61424cf8","tarball":"https://registry.npmjs.org/4anime/-/4anime-0.0.7.tgz","fileCount":6,"unpackedSize":13176,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmMz2CRA9TVsSAnZWagAAQJEQAIfGUzExk4eTpR/0kY8f\n2XkFkTP+4m7XuTInp3OHZobHUm/14yLVaTIigWvYDRcEAN7HJgijaT0sRnYo\nqYMiMcV6OrnF89/M7cm2it2YjxSBWbf7tcj3L0L/mykE2VJEV1JYfQl2UCSZ\n+SS6SHkkaaVs7oOyJQqJcQlaB5yNwbaLujzU/KSPitQmNyMxlGVouojUBrxr\nhQ/bhgU5qB6AX+GppHiPky9+hTYMKpIVxq+Vd/0hLKMNqPYDcvBv8AGiB2+k\nKLkWYPRclW7Scojj31Pd70uAot8qL+JS2P/mFaddHyy6OS9zwA6EtrRl3yJC\nEp79B0L8u98DraM7/U60ZGp6km+ewhZKVuHpNwgCAgIKmc7nwx+rNMKW3ezp\nv99J1Q8LV1n8TI07GBK1NM71WKZWPH24xdzBdsSTWq2/8bMtTbZ44q99JP1x\nCo0+LuGwsSQE6KK1t0SBdIIZkMjUXEGPlNy/orTmM4hL0nkT9yMlLwTKxYTu\nb8Du06+7SjpDN0IkwczcME2bI4KlinIpZ5pNfbc6TXN0cizP5WTD57ftAoL+\nLbexuchBfb9smthUgQ76A6LABWzdke8D4lkatEufTL1ii/39xDLRa6JBksJL\nsTWzWv7NDRA2AXQP8TW3nN26WGW4VZ+xuU2ETP6NOD9PdGFRjQ78PmEq1xZ/\nGwiK\r\n=Hq/o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID8qYXdA2ol4xZdE3hc1NvrjdwH+DcYFq6ObVkt9NoglAiEAzQfALOZcoJ5VKzgU/iyOP+u8dETSNg0BcCsc1z80q0U="}]},"_npmUser":{"name":"mrgambino","email":"admin@animetv.moe"},"directories":{},"maintainers":[{"name":"mrgambino","email":"admin@animetv.moe"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/4anime_0.0.7_1620626678345_0.9444744521691739"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-10T05:29:43.210Z","0.0.5":"2021-05-10T05:29:43.338Z","modified":"2022-04-04T10:22:20.405Z","0.0.6":"2021-05-10T05:32:59.276Z","0.0.7":"2021-05-10T06:04:38.492Z"},"maintainers":[{"name":"mrgambino","email":"admin@animetv.moe"}],"description":"A web scraper for 4anime.to","author":{"name":"mrgambino"},"license":"ISC","readme":"# 4anime Web scraper\r\nThis anime web scraper uses the 4anime.to website to get data of any anime available on the platform. \r\n\r\nThe data includes the name, the genres, the description, the type of show, the studio that produced the show, the release date, the status- i.e. completed or ongoing-, the language- i.e. subbed or dubbed, the url of the page, and the episodes.\r\n\r\nThe episodes have the following information: the episode id, the episode number, and the episode url.\r\n\r\n## Installation\r\n```bash\r\nnpm install 4anime\r\n```\r\n\r\n## Information\r\n### Anime object structure\r\n```\r\nAnime {\r\n  name: string,\r\n  genres: array of strings,\r\n  description: string,\r\n  imageUrl: string,\r\n  type: string,\r\n  studio: string,\r\n  releaseDate: string,\r\n  status: string,\r\n  language: string,\r\n  url: string,\r\n  episodes: array of objects\r\n}\r\n```\r\n\r\n### Episode object structure\r\n```\r\n    {\r\n      id: int,\r\n      episode: int,\r\n      url: string\r\n    }\r\n```\r\n\r\n## Usage\r\nThere are two functions to this package. One takes in a string and returns a list of all anime that came from the search result. The other takes in a url to the anime page and returns all the data regarding that page alone.\r\n\r\n### Getting data from url\r\n\r\n```javascript\r\nAnime.getAnimeFromURL(\"https://4anime.to/anime/the-god-of-high-school\")\r\n\t.then(res => {\r\n\t\tconsole.log(res);\r\n\t});\r\n```\r\n\r\n### Sample response\r\n```\r\nAnime {\r\n  name: 'The God of High School',\r\n  genres: [\r\n    'Action',\r\n    'Adventure',\r\n    'Comedy',\r\n    'Fantasy',\r\n    'Martial Arts',\r\n    'Sci-Fi',\r\n    'Supernatural'\r\n  ],\r\n  description: 'It all began as a fighting tournament to seek out for the best fighter among all high school students in Korea. Mori Jin, a Taekwondo specialist and a high school student, soon learns that there is something much greater beneath the stage of the tournament.',\r\n  type: 'TV Series',\r\n  studio: 'MAPPA',\r\n  releaseDate: 'Summer, 2020',\r\n  status: 'Currently Airing',\r\n  language: 'Subbed',\r\n  url: 'https://4anime.to/anime/the-god-of-high-school',\r\n  episodes: [\r\n    {\r\n      id: 42172,\r\n      episode: 1,\r\n      url: 'https://4anime.to/the-god-of-high-school-episode-01/?id=42172'\r\n    },\r\n    {\r\n      id: 42546,\r\n      episode: 2,\r\n      url: 'https://4anime.to/the-god-of-high-school-episode-02/?id=42546'\r\n    },\r\n    {\r\n      id: 42710,\r\n      episode: 3,\r\n      url: 'https://4anime.to/the-god-of-high-school-episode-03/?id=42710'\r\n    },\r\n    {\r\n      id: 42822,\r\n      episode: 4,\r\n      url: 'https://4anime.to/the-god-of-high-school-episode-04/?id=42822'\r\n    },\r\n    {\r\n      id: 42950,\r\n      episode: 5,\r\n      url: 'https://4anime.to/the-god-of-high-school-episode-05/?id=42950'\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### Getting data from a search \r\n```javascript\r\nconst Anime = require('4anime').default;\r\n\r\nAnime.getAnimeFromSearch(\"enen no shouboutai\")\r\n\t.then(res => {\r\n\t\tconsole.log(res);\r\n\t});\r\n```\r\n\r\n\r\n### Getting the video link from an episode url \r\n```javascript\r\nconst Anime = require('4anime').default;\r\n\r\nAnime.getVideoLinkFromUrl(\"https://4anime.to/one-piece-episode-938?id=43181\")\r\n\t.then(res => {\r\n\t\tconsole.log(res);\r\n\t});\r\n```\r\n\r\n### Getting ongoing anime links\r\n```javascript\r\nAnime.getOngoingLinks()\r\n  .then(res => {\r\n    console.log(res);\r\n  });\r\n``` \r\n\r\n### Downloading anime episode from video link\r\nThis function takes in the video link returned from the getVideoLinkFromURL() function and downloads the video either in current working directory of the .js file or a given path.\r\n```javascript\r\n// No given path\r\nAnime.downloadVideoFromLink(\"https://storage.googleapis.com/justawesome-183319.appspot.com/v2.4animu.me/Higurashi-no-Naku-Koro-ni-Gou/Higurashi-no-Naku-Koro-ni-Gou-Episode-04-1080p.mp4\")\r\n\r\n// With a given path\r\nAnime.downloadVideoFromLink(\"https://storage.googleapis.com/justawesome-183319.appspot.com/v2.4animu.me/Higurashi-no-Naku-Koro-ni-Gou/Higurashi-no-Naku-Koro-ni-Gou-Episode-04-1080p.mp4\", \"./test\")\r\n```\r\n\r\n## Changes\r\n* Fixed \"undefined\" TypeError in getAnimeFromURL\r\n* Fixed 403 errors in episode links\r\n* Added video download functionality\r\n","readmeFilename":"README.md"}