Skip to content

Commit

Permalink
fix: can't get chap (#62)
Browse files Browse the repository at this point in the history
* fix: can't get chap

* chore: release v0.1.19

* chore: release v0.1.20
  • Loading branch information
tachibana-akiko authored Jan 27, 2024
1 parent 88de4f1 commit eddb197
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nettruyen",
"pluginName": "Net Truyen",
"version": "0.1.18",
"version": "0.1.20",
"description": "Plugin nguồn Net Truyen",
"author": "Tachibana Shin <tachibshin@duck.com>",
"homepage": "https://github.com/manga-raiku/raiku-plugin-nettruyen",
Expand Down
2 changes: 1 addition & 1 deletion src/parsers/truyen-tranh/[slug].ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function slug(html: string, now: number): Comic {
const $detail = $("#item-detail")

const name = $detail.find("h1").text().trim()
const uid = parseInt(html.match(/gOpts\.comicId=(\d+)/)?.[1] ?? "")
const uid = parseInt(html.match(/gOpts\.comicId=\s*'?(\d+)'?\s*/)?.[1] ?? "")
// // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
// const key = html.match(/gOpts\.key=('|")([^"']+)\1/)![2]!
// eslint-disable-next-line camelcase
Expand Down
4 changes: 2 additions & 2 deletions src/parsers/truyen-tranh/[slug]/[ep-id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export default function epId(html: string, now: number): ComicChapter {
}
} as const

const manga_id = parseInt(html.match(/gOpts\.comicId=(\d+)/)?.[1] ?? "") + ""
const ep_id = parseInt(html.match(/gOpts\.chapterId=(\d+)/)?.[1] ?? "") + ""
const manga_id = parseInt(html.match(/gOpts\.comicId=\s+'?(\d+)'?\s*/)?.[1] ?? "") + ""
const ep_id = parseInt(html.match(/gOpts\.chapterId=\s*'?(\d+)'?\s*/)?.[1] ?? "") + ""
const cdn = html.match(/gOpts\.cdn="([^"]+)"/)?.[1]
const cdn2 = html.match(/gOpts\.cdn2="([^"]+)"/)?.[1]
// // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Expand Down

0 comments on commit eddb197

Please sign in to comment.