JustalK / ANIME-API

Api for searching page link, download link, streaming link of an anime and a precise episode on many website simultaneously. Only one search and you got the results from all animes websites.
MIT License
103 stars 23 forks source link

Cannot read property 'getAttribute' of undefined #8

Open jdmremi opened 3 years ago

jdmremi commented 3 years ago

When running the following code with multiple different queries to get stream links of a given show:

const anime = require('@justalk/anime-api');
anime.stream('attack').then((g) => console.log(g));

The following error is thrown:

(node:50704) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getAttribute' of undefined
    at Object.scrap_stream (C:\Users\User\Documents\Projects\Tests\node_modules\@justalk\anime-api\src\chia-anime\search.js:19:40)
    at Object.stream (C:\Users\User\Documents\Projects\Tests\node_modules\@justalk\anime-api\src\chia-anime\search.js:31:41)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 1)
    at async Object.stream (C:\Users\User\Documents\Projects\Tests\node_modules\@justalk\anime-api\src\index.js:35:13)
(node:50704) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:50704) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Node v12.18.1.

JustalK commented 3 years ago

Welcome to this project Vezqi,

I will look at it. I have no clue what could it be right now before I look at the code because you should at least have a return for 'attack of titans'. I will let you know.