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

Include article url in most viewed list #165

Open
dlinx opened this issue Jan 14, 2022 · 2 comments
Open

Include article url in most viewed list #165

dlinx opened this issue Jan 14, 2022 · 2 comments

Comments

@dlinx
Copy link

dlinx commented Jan 14, 2022

I tried most viewed function, it returned an Array of title and viewCount.
I sent the title of returned value, and got the error No article found.
I think it is better to send the wiki link along with title and viewCount

@dijs
Copy link
Owner

dijs commented Jan 14, 2022

Could you please provide an example with code and expected/actual results?

@dijs
Copy link
Owner

dijs commented Jan 14, 2022

I think you are running into the issue of looking up Special pages in Wikipedia.

I tried the same thing and it works just fine.

wiki()
			.mostViewed()
			.then(data => {
				const title = data[2].title;

				return wiki()
					.page(title)
					.then(pg =>
						pg.info().then(info => {
							info.birthPlace.should.equal('Manhattan');
							info.name.should.equal('Ronnie Spector');
						})
					);
			});

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