Skip to content

Commit

Permalink
变更依赖包名称
Browse files Browse the repository at this point in the history
  • Loading branch information
bitxx committed Jul 26, 2023
1 parent 2b89c87 commit 5ad3e10
Show file tree
Hide file tree
Showing 127 changed files with 480 additions and 505 deletions.
10 changes: 5 additions & 5 deletions app/aid/history/failure.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"os"
"sync"

"github.com/jason-wj/pholcus/app/downloader/request"
"github.com/jason-wj/pholcus/common/mgo"
"github.com/jason-wj/pholcus/common/mysql"
"github.com/jason-wj/pholcus/common/pool"
"github.com/jason-wj/pholcus/config"
"github.com/bitxx/pholcus/app/downloader/request"
"github.com/bitxx/pholcus/common/mgo"
"github.com/bitxx/pholcus/common/mysql"
"github.com/bitxx/pholcus/common/pool"
"github.com/bitxx/pholcus/config"
)

type Failure struct {
Expand Down
14 changes: 7 additions & 7 deletions app/aid/history/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (

"gopkg.in/mgo.v2/bson"

"github.com/jason-wj/pholcus/app/downloader/request"
"github.com/jason-wj/pholcus/common/mgo"
"github.com/jason-wj/pholcus/common/mysql"
"github.com/jason-wj/pholcus/common/pool"
"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/config"
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/app/downloader/request"
"github.com/bitxx/pholcus/common/mgo"
"github.com/bitxx/pholcus/common/mysql"
"github.com/bitxx/pholcus/common/pool"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/config"
"github.com/bitxx/pholcus/logs"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions app/aid/history/success.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"os"
"sync"

"github.com/jason-wj/pholcus/common/mgo"
"github.com/jason-wj/pholcus/common/mysql"
"github.com/jason-wj/pholcus/config"
"github.com/bitxx/pholcus/common/mgo"
"github.com/bitxx/pholcus/common/mysql"
"github.com/bitxx/pholcus/config"
)

type Success struct {
Expand Down
4 changes: 2 additions & 2 deletions app/aid/proxy/proxy.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package proxy

import (
"github.com/jason-wj/pholcus/config"
"github.com/bitxx/pholcus/config"
"io/ioutil"
"log"
"os"
"regexp"
"time"
)

//author: 代理模块基本重构 wj
// author: 代理模块基本重构 wj
type Proxy struct {
proxyIPTypeRegexp *regexp.Regexp
allProxyIps []string
Expand Down
20 changes: 10 additions & 10 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import (
"sync"
"time"

"github.com/jason-wj/pholcus/app/crawler"
"github.com/jason-wj/pholcus/app/distribute"
"github.com/jason-wj/pholcus/app/pipeline"
"github.com/jason-wj/pholcus/app/pipeline/collector"
"github.com/jason-wj/pholcus/app/scheduler"
"github.com/jason-wj/pholcus/app/spider"
"github.com/jason-wj/pholcus/common/teleport"
"github.com/jason-wj/pholcus/logs"
"github.com/jason-wj/pholcus/runtime/cache"
"github.com/jason-wj/pholcus/runtime/status"
"github.com/bitxx/pholcus/app/crawler"
"github.com/bitxx/pholcus/app/distribute"
"github.com/bitxx/pholcus/app/pipeline"
"github.com/bitxx/pholcus/app/pipeline/collector"
"github.com/bitxx/pholcus/app/scheduler"
"github.com/bitxx/pholcus/app/spider"
"github.com/bitxx/pholcus/common/teleport"
"github.com/bitxx/pholcus/logs"
"github.com/bitxx/pholcus/runtime/cache"
"github.com/bitxx/pholcus/runtime/status"
)

type (
Expand Down
18 changes: 9 additions & 9 deletions app/crawler/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"runtime"
"time"

"github.com/jason-wj/pholcus/app/downloader"
"github.com/jason-wj/pholcus/app/downloader/request"
"github.com/jason-wj/pholcus/app/pipeline"
"github.com/jason-wj/pholcus/app/spider"
"github.com/jason-wj/pholcus/logs"
"github.com/jason-wj/pholcus/runtime/cache"
"github.com/bitxx/pholcus/app/downloader"
"github.com/bitxx/pholcus/app/downloader/request"
"github.com/bitxx/pholcus/app/pipeline"
"github.com/bitxx/pholcus/app/spider"
"github.com/bitxx/pholcus/logs"
"github.com/bitxx/pholcus/runtime/cache"
)

// 采集引擎
Expand Down Expand Up @@ -52,7 +52,7 @@ func (self *crawler) Init(sp *spider.Spider) Crawler {
return self
}

//用于动态设置暂停时间
// 用于动态设置暂停时间
func (self *crawler) setPauseTime() {
self.pause[0] = self.Pausetime / 2
if self.pause[0] > 0 {
Expand Down Expand Up @@ -236,12 +236,12 @@ func (self *crawler) GetOne() *request.Request {
return self.Spider.RequestPull()
}

//从调度使用一个资源空位
// 从调度使用一个资源空位
func (self *crawler) UseOne() {
self.Spider.RequestUse()
}

//从调度释放一个资源空位
// 从调度释放一个资源空位
func (self *crawler) FreeOne() {
self.Spider.RequestFree()
}
Expand Down
4 changes: 2 additions & 2 deletions app/crawler/crawlerpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"sync"
"time"

"github.com/jason-wj/pholcus/config"
"github.com/jason-wj/pholcus/runtime/status"
"github.com/bitxx/pholcus/config"
"github.com/bitxx/pholcus/runtime/status"
)

// 采集引擎池
Expand Down
5 changes: 2 additions & 3 deletions app/crawler/spiderqueue.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package crawler

import (
. "github.com/jason-wj/pholcus/app/spider"
"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/logs"
)

// 采集引擎中规则队列
Expand Down
4 changes: 2 additions & 2 deletions app/distribute/master_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package distribute

import (
"encoding/json"
"github.com/jason-wj/pholcus/common/teleport"
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/common/teleport"
"github.com/bitxx/pholcus/logs"
)

// 创建主节点API
Expand Down
4 changes: 2 additions & 2 deletions app/distribute/slave_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package distribute
import (
"encoding/json"

"github.com/jason-wj/pholcus/common/teleport"
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/common/teleport"
"github.com/bitxx/pholcus/logs"
)

// 创建从节点API
Expand Down
4 changes: 2 additions & 2 deletions app/downloader/downloader.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package downloader

import (
"github.com/jason-wj/pholcus/app/downloader/request"
"github.com/jason-wj/pholcus/app/spider"
"github.com/bitxx/pholcus/app/downloader/request"
"github.com/bitxx/pholcus/app/spider"
)

// The Downloader interface.
Expand Down
8 changes: 4 additions & 4 deletions app/downloader/downloader_surfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"
"net/http/cookiejar"

"github.com/jason-wj/pholcus/app/downloader/request"
"github.com/jason-wj/pholcus/app/downloader/surfer"
"github.com/jason-wj/pholcus/app/spider"
"github.com/jason-wj/pholcus/config"
"github.com/bitxx/pholcus/app/downloader/request"
"github.com/bitxx/pholcus/app/downloader/surfer"
"github.com/bitxx/pholcus/app/spider"
"github.com/bitxx/pholcus/config"
)

type Surfer struct {
Expand Down
2 changes: 1 addition & 1 deletion app/downloader/request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sync"
"time"

"github.com/jason-wj/pholcus/common/util"
"github.com/bitxx/pholcus/common/util"
)

// Request represents object waiting for being crawled.
Expand Down
4 changes: 2 additions & 2 deletions app/downloader/request/temp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package request

import (
"encoding/json"
"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/logs"
"reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion app/downloader/surfer/example/example.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/jason-wj/pholcus/app/downloader/surfer"
"github.com/bitxx/pholcus/app/downloader/surfer"
"io/ioutil"
"log"
"time"
Expand Down
2 changes: 1 addition & 1 deletion app/downloader/surfer/param.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"time"

"github.com/jason-wj/pholcus/app/downloader/surfer/agent"
"github.com/bitxx/pholcus/app/downloader/surfer/agent"
)

type Param struct {
Expand Down
4 changes: 2 additions & 2 deletions app/downloader/surfer/surf.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"strings"
"time"

"github.com/jason-wj/pholcus/app/downloader/surfer/agent"
"github.com/jason-wj/pholcus/common/goutil"
"github.com/bitxx/pholcus/app/downloader/surfer/agent"
"github.com/bitxx/pholcus/common/goutil"
)

// Surf is the default Download implementation.
Expand Down
6 changes: 3 additions & 3 deletions app/pipeline/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"sync/atomic"
"time"

"github.com/jason-wj/pholcus/app/pipeline/collector/data"
"github.com/jason-wj/pholcus/app/spider"
"github.com/jason-wj/pholcus/runtime/cache"
"github.com/bitxx/pholcus/app/pipeline/collector/data"
"github.com/bitxx/pholcus/app/spider"
"github.com/bitxx/pholcus/runtime/cache"
)

// 结果收集与输出
Expand Down
8 changes: 4 additions & 4 deletions app/pipeline/collector/output_csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"
"os"

"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/config"
"github.com/jason-wj/pholcus/logs"
"github.com/jason-wj/pholcus/runtime/cache"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/config"
"github.com/bitxx/pholcus/logs"
"github.com/bitxx/pholcus/runtime/cache"
)

/************************ CSV 输出 ***************************/
Expand Down
2 changes: 1 addition & 1 deletion app/pipeline/collector/output_data.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package collector

import (
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/logs"
)

var (
Expand Down
10 changes: 5 additions & 5 deletions app/pipeline/collector/output_excel.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"os"

"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/common/xlsx"
"github.com/jason-wj/pholcus/config"
"github.com/jason-wj/pholcus/logs"
"github.com/jason-wj/pholcus/runtime/cache"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/common/xlsx"
"github.com/bitxx/pholcus/config"
"github.com/bitxx/pholcus/logs"
"github.com/bitxx/pholcus/runtime/cache"
)

/************************ excel 输出 ***************************/
Expand Down
12 changes: 6 additions & 6 deletions app/pipeline/collector/output_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"path/filepath"
"sync/atomic"

"github.com/jason-wj/pholcus/app/pipeline/collector/data"
bytesSize "github.com/jason-wj/pholcus/common/bytes"
"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/config"
"github.com/jason-wj/pholcus/logs"
// "github.com/jason-wj/pholcus/runtime/cache"
"github.com/bitxx/pholcus/app/pipeline/collector/data"
bytesSize "github.com/bitxx/pholcus/common/bytes"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/config"
"github.com/bitxx/pholcus/logs"
// "github.com/bitxx/pholcus/runtime/cache"
)

// 文件输出
Expand Down
6 changes: 3 additions & 3 deletions app/pipeline/collector/output_kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"regexp"
"sync"

"github.com/jason-wj/pholcus/common/kafka"
"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/common/kafka"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/logs"
)

/************************ Kafka 输出 ***************************/
Expand Down
10 changes: 5 additions & 5 deletions app/pipeline/collector/output_mgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (

mgov2 "gopkg.in/mgo.v2"

"github.com/jason-wj/pholcus/common/mgo"
"github.com/jason-wj/pholcus/common/pool"
"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/config"
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/common/mgo"
"github.com/bitxx/pholcus/common/pool"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/config"
"github.com/bitxx/pholcus/logs"
)

/************************ MongoDB 输出 ***************************/
Expand Down
6 changes: 3 additions & 3 deletions app/pipeline/collector/output_mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"sync"

"github.com/jason-wj/pholcus/common/mysql"
"github.com/jason-wj/pholcus/common/util"
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/common/mysql"
"github.com/bitxx/pholcus/common/util"
"github.com/bitxx/pholcus/logs"
)

/************************ Mysql 输出 ***************************/
Expand Down
2 changes: 1 addition & 1 deletion app/pipeline/collector/output_util.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package collector

import (
"github.com/jason-wj/pholcus/logs"
"github.com/bitxx/pholcus/logs"
)

// 主命名空间相对于数据库名,不依赖具体数据内容,可选
Expand Down
Loading

0 comments on commit 5ad3e10

Please sign in to comment.