Skip to content
This repository has been archived by the owner on Oct 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #49 from AbidZakaria/patch-1
Browse files Browse the repository at this point in the history
Website and URL changed [HeavenManga]
  • Loading branch information
SDXC authored Apr 7, 2019
2 parents f686b3a + c618ab5 commit bc99f3b
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions lua/modules/HeavenManga.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ function getinfo()
mangainfo.url=MaybeFillHost(module.RootURL, url)
if http.get(mangainfo.url) then
local x=TXQuery.Create(http.document)
mangainfo.title=x.xpathstring('//div[@class="comic-info"]/div/h1')
mangainfo.coverlink=MaybeFillHost(module.RootURL, x.xpathstring('//div[@class="comic-info"]/div/img/@src'))
mangainfo.authors=x.xpathstringall('//div[@class="comic-info"]//div[@class="author"]/a')
mangainfo.genres=x.xpathstringall('//div[@class="comic-info"]//div[@class="genre"]/a')
mangainfo.status = MangaInfoStatusIfPos(x.xpathstring('//div[@class="comic-info"]//div[@class="update"]/span[last()]'))
mangainfo.summary=x.xpathstring('//div[@class="comic-description"]/p')
if module.website == 'HeavenManga' then
mangainfo.title=x.xpathstring('//div[@class="info"]/h1')
mangainfo.coverlink=MaybeFillHost(module.RootURL, x.xpathstring('//div[@class="comic-info"]/div/img/@src'))
mangainfo.authors=x.xpathstringall('//div[@class="info"]//div[@class="author"]/a')
mangainfo.genres=x.xpathstringall('//div[@class="info"]//div[@class="genre"]/a')
mangainfo.status = MangaInfoStatusIfPos(x.xpathstring('//div[@class="info"]//div[@class="update"]/span[last()]'))
else
mangainfo.title=x.xpathstring('//div[@class="comic-info"]/div/h1')
mangainfo.coverlink=MaybeFillHost(module.RootURL, x.xpathstring('//div[@class="comic-info"]/div/img/@src'))
mangainfo.authors=x.xpathstringall('//div[@class="comic-info"]//div[@class="author"]/a')
mangainfo.genres=x.xpathstringall('//div[@class="comic-info"]//div[@class="genre"]/a')
mangainfo.status = MangaInfoStatusIfPos(x.xpathstring('//div[@class="comic-info"]//div[@class="update"]/span[last()]'))
end
mangainfo.summary=x.xpathstring('//div[@class="comic-description"]/p')
local pages = tonumber(x.xpathstring('(//div[@class="pagination"]/a[contains(@class, "page-numbers")])[last()]/substring-after(@href, "/page-")'))
if pages == nil then pages = 1 end
local p = 1
Expand Down Expand Up @@ -78,6 +86,6 @@ function AddWebsiteModule(name, url)
end

function Init()
AddWebsiteModule('HeavenManga', 'https://heavenmanga.ca')
AddWebsiteModule('HeavenManga', 'https://heavenmanga.vip')
AddWebsiteModule('HolyManga', 'http://holymanga.ca')
end

0 comments on commit bc99f3b

Please sign in to comment.