-- {"id":722,"ver":"1.0.0","libVer":"1.0.0","author":"Rider21","dep":[]} local baseURL = "https://zelluloza.ru" local SORT_BY_FILTER = 3 local SORT_BY_VALUES = { "По рейтингу", "По изменению", "По длительности чтения", "По количеству читателей", "По популярности", } local SORT_BY_TERMS = { "3", "0", "1", "2", "4" } local alphabet = { ["~"] = "0", ["H"] = "1", ["^"] = "2", ["@"] = "3", ["f"] = "4", ["0"] = "5", ["5"] = "6", ["n"] = "7", ["r"] = "8", ["="] = "9", ["W"] = "a", ["L"] = "b", ["7"] = "c", [" "] = "d", ["u"] = "e", ["c"] = "f", } local function decrypt(encrypt) -- If the input string is empty, return an empty string. if not encrypt then return "" end -- Initialize an empty string to store the decrypted text. local decrypted = "" -- Iterate through the encrypted string two characters at a time. for j = 1, #encrypt, 2 do -- Extract the first and second characters from the encrypted string. local firstChar = string.sub(encrypt, j, j) local secondChar = string.sub(encrypt, j + 1, j + 1) -- Concatenate the two characters to form a hex code. local hexCode = tonumber(alphabet[firstChar] .. alphabet[secondChar], 16) -- Convert the hex code to a character and append it to the decrypted string. decrypted = decrypted .. string.char(hexCode) end -- Return the decrypted string wrapped in
tags. return "
" .. decrypted .. "
" end local function shrinkURL(url) return url:gsub(baseURL .. "/", "") end local function expandURL(url) return baseURL .. "/books/" .. url end local function getSearch(data) local response = RequestDocument( POST( baseURL .. "/ajaxcall/", nil, FormBodyBuilder() :add("op", "morebooks") :add("par1", data[0] or "") :add("par2", "206:0:0:0.0.0.0.0.0.0.10.0.0.0.0.0..0..:" .. data[PAGE]) :add("par4", "") :build() ) ) return map(response:select('div[style="display: flex;"]'), function(v) return Novel { title = v:select('span[itemprop="name"]'):text(), link = v:select('a[class="txt"]'):attr("href"):gsub("[^%d]", ""), imageURL = baseURL .. v:select('img[class="shadow"]'):attr("src"), } end) end local function getPassage(chapterURL) local bookID, chapterID = string.match(chapterURL, "(%d+)/(%d+)") local response = Request( POST( baseURL .. "/ajaxcall/", nil, FormBodyBuilder() :add("op", "getbook") :add("par1", bookID) :add("par2", chapterID) :build() ) ):body():string() local decrypted = "" for line in string.gmatch(response:match("^(.-)