question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how can i change it to work for https://commons.wikimedia.org/

See original GitHub issue

wtf_wikipedia File:Vincent van Gogh - Sunflowers - VGM F458.jpg --json

{“title”:“File:Vincent van Gogh - Sunflowers - VGM F458.jpg”,“pageID”:43244283,“categories”:[],“sections”:[{“title”:“”,“depth”:0,“templates”:[{“list”:[“Vase with Fifteen Sunflowers”],“template”:“featuredpicture”},{“list”:[“2016-06-07”],“template”:“picture of the day”}]}]}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
spencermountaincommented, Mar 12, 2020

hey @aloukikomar you can do this now with v8 and wtf-plugin-image:

const wtf = require('wtf_wikipedia')
wtf.extend(require('wtf-plugin-markdown'))

wtf.fetch('casa', 'it', { wiki: `wiktionary` }).then(async function(doc) {
  let image = doc.images(0)

  //instead of using the redirect api, generate a direct img url
  let url = image.commonsURL()
  //https://upload.wikimedia.org/wikipedia/commons/4/4e/RybnoeDistrict_06-13_Konstantinovo_village_05.jpg
})
0reactions
crystalfpcommented, Mar 14, 2020

Unfortunately wtf-plugin-markdown crashes. See #341

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commons:Licensing
This page gives non-lawyers an overview of complicated copyright laws through an example-based tutorial. It aims to help uploaders decide whether an image ......
Read more >
Commons:Reusing content outside Wikimedia
However, almost all content hosted on Wikimedia Commons may be freely reused subject to certain restrictions (in many cases). You do not need...
Read more >
Commons:Help desk
For licensing and copyright issues, please use the copyright village pump · For proposing changes to the way Wikimedia Commons works, please use...
Read more >
Commons:FAQ
This page sums up frequently asked questions in Wikimedia Commons with a short answer and links to background pages.
Read more >
Wikimedia Commons
If you are browsing Commons for the first time, you may want to start with Featured pictures, Quality images, Valued images or Featured...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found