3415
редагувань
Admin (обговорення | внесок) Немає опису редагування |
Admin (обговорення | внесок) Немає опису редагування |
||
Рядок 5: | Рядок 5: | ||
local player = frame.args.player | local player = frame.args.player | ||
local season_titles = { | local season_titles = { | ||
"Перший_сезон", "Другий_сезон", "Третій_сезон", | "Перший_сезон", "Другий_сезон", "Третій_сезон", | ||
Рядок 21: | Рядок 20: | ||
end | end | ||
-- | -- Assuming different table class names or identifiers for different seasons | ||
local table_class = "wikitable sortable" -- default class | |||
if season == "2" then | |||
table_class = "another-class-name" -- Example: different class for "Другий сезон" | |||
end | |||
local pattern = "|%s*%[%[" .. mw.ustring.gsub(player, "([%(%)%.%-%+])", "%%%1") .. "|[^%]]+%]%]%s*|%s*(%d+)%s*|" | local pattern = "|%s*%[%[" .. mw.ustring.gsub(player, "([%(%)%.%-%+])", "%%%1") .. "|[^%]]+%]%]%s*|%s*(%d+)%s*|" | ||
local direct_pattern = "|%s*" .. mw.ustring.gsub(player, "([%(%)%.%-%+])", "%%%1") .. "%s*|%s*(%d+)%s*|" | local direct_pattern = "|%s*" .. mw.ustring.gsub(player, "([%(%)%.%-%+])", "%%%1") .. "%s*|%s*(%d+)%s*|" | ||
local rating_section = mw.ustring.match(content, "== Рейтинг ==.-{| class=\"" .. table_class .. "\"(.-)|}") | |||
if not rating_section then | if not rating_section then | ||
return "Rating section not found" | return "Rating section not found" |