-1

I'm writing a browser extension that attaches the wikipedia article length next to movie titles on lists from imdb.com. Hopefully, longer articles indicate better movies. Getting the length in words would be ideal, but so far I can't get anything out of their REST API at https://en.wikipedia.org/api/rest_v1/.

This paper from 2008 on the subject used a full wikipedia dump and processed the article text: http://www.jblumenstock.com/files/papers/jblumenstock_www08.pdf. But I'm hoping there is an API for this that could be called from a browser extension.

Once I figure this out, the next hurdle will be to get a wikipedia link given the title and year (or imdb link) for a movie.

EDIT: here is the working extension: https://github.com/harjoc/imdb-wiki-size

0

There is another API to use: https://en.wikipedia.org/w/api.php

Testing with the movie Appiness you can use the action=query asking for the prop=info like this:

https://en.wikipedia.org/w/api.php?action=query&prop=info&titles=Appiness&format=json

Which will give you, among some other metadata "length": 3675 which is the length in bytes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.