Skip to content

Commit

Permalink
phantomjs downloader support proxy ip
Browse files Browse the repository at this point in the history
  • Loading branch information
andeya committed Jul 12, 2018
1 parent 3a72ab3 commit 86555c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/downloader/surfer/phantom.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ func (self *Phantom) Download(req Request) (resp *http.Response, err error) {
strings.ToLower(param.method),
fmt.Sprint(int(req.GetDialTimeout() / time.Millisecond)),
}
if req.GetProxy() != "" {
args = append([]string{"--proxy=" + req.GetProxy()}, args...)
}

for i := 0; i < param.tryTimes; i++ {
if i != 0 {
Expand Down

0 comments on commit 86555c5

Please sign in to comment.