Closed emilioriosvz closed 8 years ago
There was a bug with the images method. Thanks for finding that! I have fixed it. And I will push out a new npm module version soon.
Here is how I would create your image search method.
const searchImages = term => wiki.page(term).then(page => page.images());
Then use:
searchImages('batman').then(images=> [do whatever])
First of all one simple example:
Suppose that potato has no images on wikipedia, in this case, my promise was never solve.
I had problems looking for some images at a time and when I stood waiting for the promises to be resolved, the application stops because some Wikipedia entries doesn't have images
How can I solve this?