Kemono-scraper icon indicating copy to clipboard operation
Kemono-scraper copied to clipboard

Support building with macOS

Open mooons opened this issue 1 year ago • 0 comments

Before the change, it won't build under macOS because getCookies is not defined for this platform (darwin):

$ go build
# github.com/elvis972602/kemono-scraper/main
./main.go:131:10: undefined: getCookies

It builds after the one-line change:

$ go build

And it works:

❯ ./main --fav-site=kemono --cookie=cookie.txt --fav-post
2024/01/15 00:42:48 load cookie from cookie.txt
2024/01/15 00:42:48 fetching favorite posts from kemono.su
Downloading Kemono
fetching creator list...
Start download 3 creators
fetching post list page 0...
fetching post list page 1...
fetching post list page 2...
fetching post list page 3...
fetching post list page 4...
fetching post list page 5...
fetching post list page 6...
fetching post list page 7...
download post: ...

Tested with macOS 14.2.1 (23C71), go version go1.21.6 darwin/arm64

Pls kindly review :)

mooons avatar Jan 15 '24 11:01 mooons