Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Article not found #80

Closed
Piyush-Srivastava opened this issue Apr 22, 2018 · 2 comments
Closed

Article not found #80

Piyush-Srivastava opened this issue Apr 22, 2018 · 2 comments

Comments

@Piyush-Srivastava
Copy link

Shows article not found error for queries like kylie jenner and does not retrieves images of some queries.

@dijs
Copy link
Owner

dijs commented Apr 24, 2018

How are you using the library? Here is how I am using it successfully.

wiki()
      .search('kylie jenner')
      .then(res => res.results[0])
      .then(name => wiki().page(name))
      .then(page => page.fullInfo())
      .then(info => {
        console.log(info);
        done();
      })

Outputs

{ general:
   { name: 'Kylie Jenner',
     image: 'Kylie Jenner2 (cropped).png',
     caption: 'Jenner in 2017',
     birthName: 'Kylie Kristen Jenner',
     birthDate: { date: 1997-08-09T21:00:00.000Z, age: 20 },
     birthPlace: 'Los Angeles',
     residence: 'Hidden Hills, California',
     education: [ 'Sierra Canyon School', 'Laurel Springs School' ],
     occupation: 'flat list',
     yearsActive: '2007–present',
     television: [ 'Keeping Up with the Kardashians', 'Life of Kylie' ],
     parents: [ 'Caitlyn Jenner', 'Kris Jenner' ],
     partners: [ 'Tyga', 'Travis Scott' ],
     children: 'Stormi Webster',
     relatives:
      [ 'Kendall Jenner',
        'Kim Kardashian',
        'Kourtney Kardashian',
        'Khloé Kardashian',
        'Rob Kardashian',
        'Brandon Jenner',
        'Brody Jenner' ],
     website: 'http://thekyliejenner.com/' } }

Although. I do see a use case of offering a better find method for wiki that does this automatically...

I will implement that.

Hope this helps :)

@dijs
Copy link
Owner

dijs commented Apr 24, 2018

Implemented and pushed in new version v4.7.0

wiki()
      .find('kylie jenner')
      .then(page => page.fullInfo())
      .then(info => {
        info.general.birthName.should.equal('Kylie Kristen Jenner');
        done();
      });

@dijs dijs closed this as completed Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants