fix(latest): read asura cover from coverUrl prop and send Chrome UA

- asura og:image is now a 1200x630 social card on the challenged main host; read the astro-island coverUrl prop instead.
- cdn.asurascans.com challenges Go's default User-Agent; TLSCoverFetcher now sends chromeUA.
This commit is contained in:
2026-12-04 23:28:59 +07:00
parent 3a83161b1c
commit 9209b6fb2c
4 changed files with 47 additions and 9 deletions
+16 -2
View File
@@ -341,13 +341,27 @@ func comixCoverURL(seriesURL, body string) string {
return publishedCoverURL(entry.Poster.Medium)
}
// ogImageCover reads the og:image metadata shared by asura, demonic and
// ogImageCover reads the og:image metadata shared by demonic and
// lightnovelworld.
func ogImageCover(_, body string) (string, bool) {
cover := metaContent(body, "property", "og:image")
return cover, cover != ""
}
// asuraCoverRe reads coverUrl from the astro-island props, in both quote forms
// asuraStatusRe accepts. asura's og:image stopped being the cover (seen
// 2026-12-04): it is now a 1200x630 social card on asurascans.com itself,
// which also challenges every fetch without a Chrome TLS fingerprint.
var asuraCoverRe = regexp.MustCompile(`(?:"|")coverUrl(?:"|"):\[0,(?:"|")(https://[^&"]+)`)
func asuraCover(_, body string) (string, bool) {
m := asuraCoverRe.FindStringSubmatch(body)
if m == nil {
return "", false
}
return m[1], true
}
func novelfullCoverEntry(_, body string) (string, bool) {
cover := metaContent(body, "name", "image")
return cover, cover != ""
@@ -541,7 +555,7 @@ var sites = map[string]site{
"asura": {
Host: "asurascans.com",
LatestChapter: asuraLatestChapter,
Cover: ogImageCover,
Cover: asuraCover,
Completed: asuraCompleted,
Rest: defaultRest,
Gap: defaultGap,