local p = {}
function p.IMDb(frame)
local tipo = frame.args['tipo']
local id = frame.args['id']
local pagina = mw.title.getCurrentTitle() --nome della pagina
local result = '* (\'\'\'EN\'\'\') Scheda su \'\'[http://www.imdb.com/'
if tipo == 'titolo' or tipo == 'film' then
tipo = 'title/tt'
elseif tipo == 'compagnia' then
tipo = 'company/co'
elseif tipo == 'nome' then
tipo = 'name/nm'
elseif tipo == 'personaggio' then
tipo = 'character/ch'
end
local wdIMDb = frame:preprocess("{{#property:P214}}")
result = result .. tipo .. id
result = result .. '/ '
result = result .. pagina.text
result = result .. ']\'\' dell\'\[\[Internet Movie Database\]\]'
return result .. " **** " .. wdIMDb
end
return p