File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ RUN go mod download
10
10
RUN cd /backendBuild/backend-server/ && \
11
11
go build -o backend_cmd -ldflags="-s -w " main.go
12
12
13
- FROM alpine:latest
14
- # FROM docker.io/chromedp/headless-shell:latest
15
- # RUN apt-get update; apt install dumb-init -y; apt install ca-certificates -y
16
- # ENTRYPOINT ["dumb-init", "--"]
13
+ # FROM alpine:latest
14
+ FROM docker.io/chromedp/headless-shell:latest
15
+ RUN apt-get update; apt install dumb-init -y; apt install ca-certificates -y
16
+ ENTRYPOINT ["dumb-init", "--"]
17
17
18
18
COPY --from=build /backendBuild/backend-server/backend_cmd /usr/bin/backend_cmd
19
19
Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ func Fetch(websiteURL string) *model.Entry {
61
61
62
62
func generateEntry (resp * Response ) * model.Entry {
63
63
entry := new (model.Entry )
64
- entry .FullContent = "<p>" + resp .Thread .Post .Record .Text + "</p>"
64
+
65
+ entry .FullContent = "<p>" + strings .ReplaceAll (resp .Thread .Post .Record .Text , "\n " , "<br>" ) + "</p>"
65
66
if resp .Thread .Post .Embed .EmbedType == "app.bsky.embed.images#view" {
66
67
for _ , image := range resp .Thread .Post .Embed .EmbedImages {
67
68
entry .FullContent = entry .FullContent + "<img src='" + image .Thumb + "' /><br>"
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ func ThreadsByheadless(websiteURL string) string {
43
43
//ctx, cancel := chromedp.NewContext(context.Background())
44
44
defer cancelCtx ()
45
45
htmlContent := ""
46
- common .Logger .Info ("notion headless fetch 1 " )
46
+ common .Logger .Info ("threads headless fetch 1 " )
47
47
err := chromedp .Run (allocCtx ,
48
48
chromedp .Navigate (websiteURL ),
49
49
chromedp .WaitVisible (`[data-pressable-container=true]` , chromedp .ByQuery ),
You can’t perform that action at this time.
0 commit comments