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

Development #15

Merged
merged 3 commits into from
Nov 17, 2023
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,8 @@ For more examples, you can refer to the following project.

* `-s` Self-signed server certificate. If not set, the default CA certificate of this project will be used for signing.
* `-c` Create a new CA certificate. If not set, the default CA certificate of this project will be used.
* `-i` Add server IP addresses, separated by commas.
* `-h` Add server domain names, separated by commas.

dev

Expand Down
2 changes: 2 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,8 @@ go run example_spider.go -c example.yml -n example -f TestOk -m once

* -s 自签名服务器证书。如果不设置,会使用本项目默认ca证书进行签名
* -c 新创建ca证书。如果不设置,会使用本项目默认ca证书
* -i 添加服务器ip,逗号分割
* -h 添加服务器域名,逗号分割

开发

Expand Down
2 changes: 2 additions & 0 deletions docs/content/en/docs/usage/tools/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ title: "Tools"

* `-s` Self-signed server certificate. If not set, the default CA certificate of this project will be used for signing.
* `-c` Create a new CA certificate. If not set, the default CA certificate of this project will be used.
* `-i` Add server IP addresses, separated by commas.
* `-h` Add server domain names, separated by commas.

dev

Expand Down
2 changes: 2 additions & 0 deletions docs/content/zh/docs/usage/tools/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ title: "工具"

* -s 自签名服务器证书。如果不设置,会使用本项目默认ca证书进行签名
* -c 新创建ca证书。如果不设置,会使用本项目默认ca证书
* -i 添加服务器ip,逗号分割
* -h 添加服务器域名,逗号分割

开发

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func (c *Config) GetEnableNonePipeline() bool {
c.EnableCsvPipeline = &enableNonePipeline
}

return *c.EnableCsvPipeline
return *c.EnableNonePipeline
}
func (c *Config) GetEnableCsvPipeline() bool {
if c.EnableCsvPipeline == nil {
Expand Down
9 changes: 2 additions & 7 deletions pkg/exporter/exporter.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package exporter

import (
"errors"
"github.com/lizongying/go-crawler/pkg"
"github.com/lizongying/go-crawler/pkg/pipelines"
"reflect"
Expand All @@ -19,14 +18,10 @@ type Exporter struct {

func (e *Exporter) Export(item pkg.Item) (err error) {
for _, v := range e.pipelines {
e := v.ProcessItem(item)
if e != nil {
err = errors.Join(err, e)
if err = v.ProcessItem(item); err != nil {
e.logger.Error(err)
}
}
if err != nil {
e.logger.Error(err)
}
return
}

Expand Down
12 changes: 8 additions & 4 deletions web/ui/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ import {onBeforeUnmount, ref} from "vue";
const nodesStore = useNodesStore()
nodesStore.GetNodes()

// auto refresh
const checked1 = ref(true)
const checked1Disable = ref(true)
let interval = 0
const refresh = () => {
nodesStore.GetNodes()
}
const checked1 = ref(false)
const checked1Disable = ref(false)

let interval = null
refresh()
if (checked1.value) {
interval = setInterval(refresh, 1000)
}
const changeSwitch = () => {
if (checked1.value) {
interval = setInterval(refresh, 1000)
Expand Down
Loading