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

Template transclusion #223

Open
GitterHubber opened this issue Dec 16, 2018 · 1 comment
Open

Template transclusion #223

GitterHubber opened this issue Dec 16, 2018 · 1 comment
Labels

Comments

@GitterHubber
Copy link

GitterHubber commented Dec 16, 2018

Hello!

Node v10.14.2
OS Windows7, 64bit

I'm running this code

var wtf = require('wtf_wikipedia');

wtf.fetch('Copper').then(doc => {
console.log(doc.infobox(0).json());
});

But unable to get any output. There is as infobox present on that page.

@spencermountain
Copy link
Owner

hi, oh yeah, this is annoying.
The Copper infobox is 'transcluded', which means that it is actually here, and not on the copper page

you can retrieve it like this:

(async () => {
  var doc = await wtf.fetch('Template:Infobox copper');
  console.log(doc.infoboxes(0).json());
})();

cheers

@spencermountain spencermountain changed the title No output for Infobox Template transclusion Jan 2, 2020
@spencermountain spencermountain pinned this issue Jan 2, 2020
@spencermountain spencermountain unpinned this issue Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants