dopecodez / Wikipedia

Wikipedia for node and the browser
MIT License
82 stars 19 forks source link

Ability to get a page from URL, not only the title and pageId #56

Open carlmachaalani opened 8 months ago

carlmachaalani commented 8 months ago

Hi,

It would be nice to also add the URL of the Wikipedia page as a parameter of wiki.page(), not only the title and pageId.

Thanks!

dopecodez commented 8 months ago

Any suggestions on what would be the better approach - wiki.page("https://en.wikipedia.org/wiki/Batman") or more explicitly having wiki.page(url: "https://en.wikipedia.org/wiki/Batman"). It sounds like an useful feature that would be worth exploring.

carlmachaalani commented 8 months ago

Thanks for your reply.

In my opinion, explicitly having wiki.page(url: "https://en.wikipedia.org/wiki/Batman") would be cleaner.

kingram6865 commented 7 months ago

Thanks for your reply.

In my opinion, explicitly having wiki.page(url: "https://en.wikipedia.org/wiki/Batman") would be cleaner.

I agree. Explicitly indicating url is a good solution.