Issue with XXX.5 chapter & exact match
Belphemur opened this issue · comments
Describe the bug
Hello,
I was repurposing the AsuraScans searcher for FlameScans (same website engine).
I have a couple of issue with the manga: Omniscient Reader's Viewpoint
1. mangal inline --source FlameScans --include-anilist-manga --query "Omniscient Reader’s Viewpoint" --manga exact --chapters all -j
don't find anything (while the search do find it).
2. when I change it for mangal inline --source FlameScans --include-anilist-manga --query "Omniscient" --chapters all -j
I get that it can't parse the chapter 142.5
All I've done was literally copy and paste AsuraScans.lua and change the baseUrl.
Reproduction steps
No response
Expected behavior
Find chapter for the manga.
Additional context
stack trace:
{"query":"Omniscient Reader","result":[]}root@ae5cf7d5da70:/app# mangal inline --source FlameScans --include-anilist-manga --query "Omniscient" --chapters all -j
panic: MangaChapters was expected to return a table with unsigned integers as keys. strconv.ParseUint: parsing "142.5": invalid syntax
stack traceback:
[G]: ?
goroutine 1 [running]:
github.com/yuin/gopher-lua.panicWithTraceback(0xc0001dfd00?)
github.com/yuin/gopher-lua@v1.0.0/state.go:601 +0xa5
github.com/yuin/gopher-lua.(*LState).raiseError(0xc000432630, 0x1, {0xc0001df980?, 0x7f?}, {0x0?, 0x0?, 0x0?})
github.com/yuin/gopher-lua@v1.0.0/state.go:696 +0x25d
github.com/yuin/gopher-lua.(*LState).RaiseError(...)
github.com/yuin/gopher-lua@v1.0.0/state.go:1671
github.com/metafates/mangal/provider/custom.(*luaSource).ChaptersOf.func1({0x156dc20, 0xc0000d4808}, {0x156cfe0?, 0xc000081140?})
github.com/metafates/mangal/provider/custom/chapters.go:40 +0x226
github.com/yuin/gopher-lua.(*LTable).ForEach(0xc000080de0, 0xc000275a10)
github.com/yuin/gopher-lua@v1.0.0/table.go:344 +0x247
github.com/metafates/mangal/provider/custom.(*luaSource).ChaptersOf(0xc000182de0, 0xc00001e900)
github.com/metafates/mangal/provider/custom/chapters.go:29 +0x1c6
github.com/metafates/mangal/inline.prepareManga(0xc00001e900, 0xc000275c88)
github.com/metafates/mangal/inline/json.go:57 +0x6c
github.com/metafates/mangal/inline.Run(0xc000275c88)
github.com/metafates/mangal/inline/inline.go:47 +0x74d
github.com/metafates/mangal/cmd.glob..func11(0x1d26c80?, {0x101d881?, 0x8?, 0x8?})
github.com/metafates/mangal/cmd/inline.go:149 +0x567
github.com/spf13/cobra.(*Command).execute(0x1d26c80, {0xc0004b0700, 0x8, 0x8})
github.com/spf13/cobra@v1.6.1/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x1d2a040)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.6.1/command.go:968
github.com/metafates/mangal/cmd.Execute()
github.com/metafates/mangal/cmd/root.go:112 +0x7a
main.main()
github.com/metafates/mangal/main.go:13 +0x4d
Operating System
Linux
I kind of figured it out.
I've added a PR for the scrapers with FlameScans.