How to get license and attribution?
See original GitHub issueHello, First of all thank you to Spencer and all the other contributors to this amazing library! I’m trying to get the license and attribution for the images via their commons page, what I’m doing now is making the commons URL first and then trying to find the information from that page. however, I’m not sure how to advance. as an example getting the second image’s info from “Alexander the Great” wiki article:
wtf.fetch('Alexander the Great').then(doc => {
let commonsPageURL = `https://commons.wikimedia.org/wiki/${doc.images()[1].file()}`
wtf.fetch(commonsPageURL, {wiki:"commons.wikimedia"}).then(doc => {
console.log(doc.tables()) // nothing
console.log(doc.section("summary")) // nothing
console.log(doc.section("licensing")) //nothing
console.log(doc.sections()) // two sections with templates
})
})
Am I going about this in the wrong way?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Get a CC License. Put it on your website. - Creative Commons
First steps · What is Creative Commons? · You don't need to register your work – just pick a license! · Make sure...
Read more >How to Apply a Creative Commons License to Your Work
Step 4: Add the License to Your Work · Insert a copy of the appropriate CC icon from: http://creativecommons.org/about/downloads · Add some text, ......
Read more >How to Create an Attribution - Learn To Cite - Research Guides
You can use CC-licensed materials as long as you follow the license conditions; one of which is always that you give attribution.
Read more >Understanding copyright, licensing and attribution for photos ...
Whenever you use an image that has a Creative Commons license, you have to credit the author. This is a “moral right” even...
Read more >How to attribute Creative Commons licensed materials
credit the creator · provide the title of the work · provide the URL where the work is hosted · indicate the type...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hey @FFatur - that is a very clever solution, and a cool way to use the api. Yeah- they sure don’t make it easy. That image is using the self template, and I’ve seen a lot of images use the pd-self template. Looks like there’s also licence info in the Information template, like this one
oof - i’d be happy to work on improving this with you. If you got a sense for where the bulk of the licence data is, maybe we could add a
Image.licence()
method, or something? cheersgood question. Yeah, i was originally supporting
.images(0).json()
, as a supposedly-cleaner version than.images()[0] ...
with null-checking. But the main library’s been turning-back from that. The plugins should follow. Like you said, it makes the typescript a mess. Feel free to change it - it just means a major version for the breaking change. cheers