Skip to content

Commit

Permalink
KappaBeast: Fixed manga info (#1708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slasar41 authored Oct 9, 2024
1 parent e99c6c5 commit 2111f18
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions lua/modules/KappaBeast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end
----------------------------------------------------------------------------------------------------

local Template = require 'templates.MangaThemesia'
DirectoryPagination = '/series/list-mode/'
-- DirectoryPagination = '/manga/list-mode/'
-- XPathTokenAuthors = 'Author'
-- XPathTokenArtists = 'Artist'

Expand All @@ -37,28 +37,12 @@ end
function GetInfo()
Template.GetInfo()

local v, x = nil

x = CreateTXQuery(HTTP.Document)
MANGAINFO.Authors = x.XPathString('//span[contains(., "' .. XPathTokenAuthors .. '")]/following-sibling::span')
MANGAINFO.Artists = x.XPathString('//span[contains(., "' .. XPathTokenArtists .. '")]/following-sibling::span')
MANGAINFO.Genres = x.XPathStringAll('//div[@class="sertogenre"]/a')
MANGAINFO.Status = MangaInfoStatusIfPos(x.XPathString('//div[@class="sertostat"]/span'))

for v in x.XPath('//div[@class="eplister eplisterfull"]/ul//a').Get() do
MANGAINFO.ChapterLinks.Add(v.GetAttribute('href'))
MANGAINFO.ChapterNames.Add(x.XPathString('div[@class="epl-num"]/normalize-space(.)', v))
end
MANGAINFO.ChapterLinks.Reverse(); MANGAINFO.ChapterNames.Reverse()

return no_error
end

-- Get the page count for the current chapter.
function GetPageNumber()
Template.GetPageNumber()

CreateTXQuery(HTTP.Document).XPathStringAll('//div[@class="epcontent entry-content"]/p/img/@src', TASK.PageLinks)

return no_error
end

0 comments on commit 2111f18

Please sign in to comment.