mirror of
https://github.com/skidoodle/ncore-stats.git
synced 2026-04-28 15:57:37 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c068755d4a
|
|||
|
a9216c116b
|
+2
-1
@@ -21,7 +21,8 @@ builds:
|
|||||||
- -trimpath
|
- -trimpath
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- formats:
|
||||||
|
- tar.gz
|
||||||
name_template: >-
|
name_template: >-
|
||||||
{{ .ProjectName }}_
|
{{ .ProjectName }}_
|
||||||
{{- .Version }}_
|
{{- .Version }}_
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,6 @@
|
|||||||
FROM golang:1.26.1-alpine AS builder
|
FROM golang:1.26.1-alpine AS builder
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache git ca-certificates tzdata
|
RUN apk add --no-cache ca-certificates tzdata
|
||||||
|
|
||||||
RUN addgroup -S -g 10001 appgroup && \
|
RUN addgroup -S -g 10001 appgroup && \
|
||||||
adduser -S -u 10001 -G appgroup appuser
|
adduser -S -u 10001 -G appgroup appuser
|
||||||
@@ -20,6 +20,7 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|||||||
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
||||||
COPY --from=builder /etc/passwd /etc/passwd
|
COPY --from=builder /etc/passwd /etc/passwd
|
||||||
COPY --from=builder /etc/group /etc/group
|
COPY --from=builder /etc/group /etc/group
|
||||||
|
|
||||||
COPY --from=builder --chown=10001:10001 /build/ncore-stats /app/ncore-stats
|
COPY --from=builder --chown=10001:10001 /build/ncore-stats /app/ncore-stats
|
||||||
COPY --from=builder --chown=10001:10001 /build/web /app/web
|
COPY --from=builder --chown=10001:10001 /build/web /app/web
|
||||||
COPY --from=builder --chown=10001:10001 /app/data /app/data
|
COPY --from=builder --chown=10001:10001 /app/data /app/data
|
||||||
|
|||||||
+2
-2
@@ -130,8 +130,8 @@ func (s *State) fetchProfile(ctx context.Context, user User) (*ProfileData, erro
|
|||||||
})
|
})
|
||||||
|
|
||||||
doc.Find(".lista_mini_fej").Each(func(i int, sel *goquery.Selection) {
|
doc.Find(".lista_mini_fej").Each(func(i int, sel *goquery.Selection) {
|
||||||
text := sel.Text()
|
text := strings.ToLower(sel.Text())
|
||||||
if strings.Contains(text, "seeding") || strings.Contains(text, "futó") {
|
if strings.Contains(text, "fel:") || strings.Contains(text, "le:") || strings.Contains(text, "seeding") || strings.Contains(text, "futó") {
|
||||||
if m := regexp.MustCompile(`\((\d+)\)`).FindStringSubmatch(text); len(m) > 1 {
|
if m := regexp.MustCompile(`\((\d+)\)`).FindStringSubmatch(text); len(m) > 1 {
|
||||||
p.SeedingCount, _ = strconv.Atoi(m[1])
|
p.SeedingCount, _ = strconv.Atoi(m[1])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user