Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Path Segment in URL cannot contain a colon Bug #4

Merged
merged 5 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/",
"args": ["-s","-r", "https://www.hellokuya.co"]
},
"args": ["-s", "-r", "https://www.hellokuya.co"]
}
]
}
}
36 changes: 17 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
module github.com/shurco/goclone

go 1.20
go 1.22

require (
github.com/PuerkitoBio/goquery v1.8.1
github.com/geziyor/geziyor v0.0.0-20230315135110-a242b58aaa65
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.0
)

require (
github.com/VividCortex/gohistogram v1.0.0 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chromedp/cdproto v0.0.0-20220428002153-285dfb42699c // indirect
github.com/chromedp/chromedp v0.8.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chromedp/cdproto v0.0.0-20240214232516-ad4608604e9e // indirect
github.com/chromedp/chromedp v0.9.5 // indirect
github.com/chromedp/sysutil v1.0.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/kit v0.13.0 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.1.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gobwas/ws v1.3.2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.34.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/temoto/robotstxt v1.1.2 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
google.golang.org/protobuf v1.28.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
)
76 changes: 50 additions & 26 deletions go.sum

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions pkg/arrutil/arrutil.go

This file was deleted.

39 changes: 39 additions & 0 deletions pkg/crawler/base.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package crawler

import "net/url"

type Flags struct {
Open bool
Serve bool
ServePort int
UserAgent string
ProxyString string
Cookies bool
Robots bool
BrowserEndpoint string
}

var (
files filesBase

projectURL *url.URL
projectPath string
domain string
)

type filesBase struct {
pages []string
css []string
js []string
img []string
font []string
}

func contains(slice []string, sub string) bool {
for _, s := range slice {
if s == sub {
return true
}
}
return false
}
Loading
Loading