refactor: use flare client for sources with cloudflareClient in Kotlin

- Batch 5: mangawork, mangotheme, mccms, multichan → flare (Kotlin uses cloudflareClient)
- Batch 6: natsuid → flare (Kotlin uses cloudflareClient)
- Batch 7: gravureblogger → flare (Kotlin uses cloudflareClient)

All verified against Kotlin multisrc reference.
This commit is contained in:
achmad
2026-05-13 21:57:34 +07:00
parent 71ef2d24fa
commit e17de903b2
6 changed files with 18 additions and 18 deletions
@@ -13,7 +13,7 @@ import (
"github.com/PuerkitoBio/goquery"
"goyomi/internal/httpclient"
"goyomi/internal/httpclient/flare"
"goyomi/internal/source"
"goyomi/sources/base/util"
)
@@ -28,12 +28,12 @@ type Config struct {
type Source struct {
cfg Config
client *httpclient.Client
client *flare.Client
id int64
}
func New(cfg Config) *Source {
c := httpclient.NewClient(httpclient.WithRateLimit(1, 2))
c := flare.NewClient(flare.WithRateLimit(1, 2))
return &Source{cfg: cfg, client: c, id: source.GenerateSourceID(cfg.Name, cfg.Lang)}
}
+3 -3
View File
@@ -16,7 +16,7 @@ import (
"github.com/PuerkitoBio/goquery"
"goyomi/internal/httpclient"
"goyomi/internal/httpclient/flare"
"goyomi/internal/source"
"goyomi/sources/base/util"
)
@@ -35,7 +35,7 @@ type Config struct {
type Source struct {
cfg Config
client *httpclient.Client
client *flare.Client
id int64
}
@@ -58,7 +58,7 @@ func New(cfg Config) *Source {
if cfg.LatestOrder == "" {
cfg.LatestOrder = "update"
}
c := httpclient.NewClient(httpclient.WithRateLimit(2, 3))
c := flare.NewClient(flare.WithRateLimit(2, 3))
return &Source{cfg: cfg, client: c, id: source.GenerateSourceID(cfg.Name, cfg.Lang)}
}
+3 -3
View File
@@ -15,7 +15,7 @@ import (
"net/http"
"strings"
"goyomi/internal/httpclient"
"goyomi/internal/httpclient/flare"
"goyomi/internal/source"
"goyomi/sources/base/util"
)
@@ -30,7 +30,7 @@ type Config struct {
type Source struct {
cfg Config
client *httpclient.Client
client *flare.Client
id int64
}
@@ -38,7 +38,7 @@ func New(cfg Config) *Source {
if cfg.APIPath == "" {
cfg.APIPath = "/api"
}
c := httpclient.NewClient(httpclient.WithRateLimit(2, 1))
c := flare.NewClient(flare.WithRateLimit(2, 1))
return &Source{cfg: cfg, client: c, id: source.GenerateSourceID(cfg.Name, cfg.Lang)}
}
+3 -3
View File
@@ -10,7 +10,7 @@ import (
"github.com/PuerkitoBio/goquery"
"goyomi/internal/httpclient"
"goyomi/internal/httpclient/flare"
"goyomi/internal/source"
"goyomi/sources/base/util"
)
@@ -25,7 +25,7 @@ type Config struct {
type Source struct {
cfg Config
client *httpclient.Client
client *flare.Client
id int64
}
@@ -33,7 +33,7 @@ func New(cfg Config) *Source {
if cfg.LazyLoadAttr == "" {
cfg.LazyLoadAttr = "data-original"
}
c := httpclient.NewClient(httpclient.WithRateLimit(2, 3))
c := flare.NewClient(flare.WithRateLimit(2, 3))
return &Source{cfg: cfg, client: c, id: source.GenerateSourceID(cfg.Name, cfg.Lang)}
}
+3 -3
View File
@@ -12,7 +12,7 @@ import (
"github.com/PuerkitoBio/goquery"
"goyomi/internal/httpclient"
"goyomi/internal/httpclient/flare"
"goyomi/internal/source"
"goyomi/sources/base/util"
)
@@ -25,12 +25,12 @@ type Config struct {
type Source struct {
cfg Config
client *httpclient.Client
client *flare.Client
id int64
}
func New(cfg Config) *Source {
c := httpclient.NewClient(httpclient.WithRateLimit(2, 3))
c := flare.NewClient(flare.WithRateLimit(2, 3))
return &Source{cfg: cfg, client: c, id: source.GenerateSourceID(cfg.Name, cfg.Lang)}
}
+3 -3
View File
@@ -15,7 +15,7 @@ import (
"github.com/PuerkitoBio/goquery"
"goyomi/internal/httpclient"
"goyomi/internal/httpclient/flare"
"goyomi/internal/source"
"goyomi/sources/base/util"
)
@@ -29,7 +29,7 @@ type Config struct {
type Source struct {
cfg Config
client *httpclient.Client
client *flare.Client
id int64
}
@@ -37,7 +37,7 @@ func New(cfg Config) *Source {
if cfg.PostType == "" {
cfg.PostType = "manga"
}
c := httpclient.NewClient(httpclient.WithRateLimit(1, 2))
c := flare.NewClient(flare.WithRateLimit(1, 2))
return &Source{cfg: cfg, client: c, id: source.GenerateSourceID(cfg.Name, cfg.Lang)}
}