Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy committed Feb 28, 2023
1 parent bd523aa commit 6a101ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions extensions/pipelines/http/emulator/rod/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
"github.com/vortex14/gotyphoon/log"
"os"
"time"

Expand Down Expand Up @@ -78,6 +79,11 @@ func CreateRodRequestPipeline(
detailOptions.Options.Timeout = task.GetFetcherTimeout()
detailOptions.Options.Proxy = task.GetProxyAddress()

if len(task.GetProxyAddress()) > 0 {
context = log.PatchCtx(context, map[string]interface{}{"proxy": task.GetProxyAddress()})
_, logger = log.Get(context)
}

browser := CreateBaseBrowser(detailOptions.Options)

var pErr error
Expand Down
4 changes: 2 additions & 2 deletions extensions/pipelines/http/emulator/rod/test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ func TestCreateRodPipeline(t *testing.T) {

Convey("create a new pipeline", t, func() {
_task := fake.CreateDefaultTask()
_task.SetProxyAddress("http://localhost:8888")
//_task.SetProxyAddress("http://localhost:8888")
//_task.SetProxyAddress("http://ukehiuwv-982:[email protected]")
//_task.SetProxyServerUrl("http://proxy-manager.typhoon-s1.ru")
_task.SetProxyServerUrl("http://proxy-manager.typhoon-s1.ru")
p := CreateRodRequestPipeline(
forms.GetNotRetribleOptions(),
&DetailsOptions{
Expand Down

0 comments on commit 6a101ae

Please sign in to comment.