spencermountain / wtf_wikipedia

a pretty-committed wikipedia markup parser
https://observablehq.com/@spencermountain/wtf_wikipedia
MIT License
770 stars 129 forks source link

[Issue]: Missing text value's when parsing Wikivoyage children #560

Closed MarketingPip closed 11 months ago

MarketingPip commented 11 months ago

When using .sections() normally, you can see the templates with text properly parsed from Wiki Markup. But when calling using .children() values are returning as ''.

spencermountain commented 11 months ago

Thanks Jared, can you give an example so I can reproduce this? Thanks

MarketingPip commented 11 months ago

My apologizes - I was making improper usage of "wtf_wikipedia". I was calling .children() & "text" key(s) are returning empty in "_templates" for the objects.

Which I should have been calling doc.children()[my_index_here].json() to access the templates instead of doc.children()[my_index_here]

My stupidity.

Thanks for quick reply & hope you had an awesome thanksgiving Spencer, cheers!