Kylart / MalScraper

Scrape everything you can from MyAnimeList.net
MIT License
177 stars 50 forks source link

search maxResults not working #21

Closed daakubotto closed 4 years ago

daakubotto commented 4 years ago

Although I'm really enjoying this API for my little project there is a tiny issue that causes a lot of stuff to go slower,

in the search function the option maxResults isn't functional. No matter what is put there (1, 250, 40) it will always return 50.

const malScraper = require('mal-scraper')
const search = malScraper.search

var anime = search.search('anime', {
    maxResults: 100,
    term: argument
 })
    .catch(console.error)
    .then((results) => console.log(results.length))

always returns 50. no matter what you set maxResults to.

Kylart commented 4 years ago

I am releasing a new version in a few minutes with this bug fixed.

Thanks @daakubotto !

modox94 commented 4 years ago

It don't work again :( If send number over 50 return error, if under 50 return 50 titles.

JustalK commented 4 years ago

I have fixed the issue, describe the problem inside the pull request and added a test that should prevent the problem to ever happen again.

Kylart commented 4 years ago

This is now fixed and deployed in v2.11.0!

Thanks @JustalK !