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

support images in tables #495

Open
qxb3 opened this issue Jul 29, 2022 · 3 comments
Open

support images in tables #495

qxb3 opened this issue Jul 29, 2022 · 3 comments

Comments

@qxb3
Copy link

qxb3 commented Jul 29, 2022

So i have this wiki for a game Link

And they have this table with some images and looks like images() function is not catching those images?

Here my code:

const page = await wiki.fetch(title, {
  domain: 'www.miragerealms.co.uk',
  path: 'wiki/api.php'
})

const test = page.images().map(image => image.url())
console.log(test)
@spencermountain
Copy link
Owner

hey @qxb3 - good catch. it's not looking for images inside tables.

let str = `
{|
|-
| [[File:Sword-0.png]]
| [[Primitive Sword]]
| 4
| 15
|}
`
let doc = wtf(str)
console.log(doc.images())

i'm happy to add this in the next release. Can try to do it next week.
cheers

@qxb3
Copy link
Author

qxb3 commented Jul 29, 2022

Alright. Thanks!

@spencermountain spencermountain changed the title images() not caching other images support images in tables Dec 8, 2022
@spencermountain
Copy link
Owner

hey qxb3, this one is harder than i thought and will require a refactor. pushing it to next major release.
thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants