@@ -31,7 +31,7 @@ type Client struct {
31
31
func New (c * providers.Config , filters providers.Filters ) (* Client , error ) {
32
32
client := & Client {config : c , filters : filters }
33
33
// Fetch the list of available CommonCrawl Api URLs.
34
- resp , err := httpclient .MakeRequest (c .Client , "http://index.commoncrawl.org/collinfo.json" , int ( c .MaxRetries ) )
34
+ resp , err := httpclient .MakeRequest (c .Client , "http://index.commoncrawl.org/collinfo.json" , c .MaxRetries , c . Timeout )
35
35
if err != nil {
36
36
return nil , err
37
37
}
@@ -78,7 +78,7 @@ paginate:
78
78
logrus .WithFields (logrus.Fields {"provider" : Name , "page" : page }).Infof ("fetching %s" , domain )
79
79
}
80
80
apiURL := c .formatURL (domain , page )
81
- resp , err := httpclient .MakeRequest (c .config .Client , apiURL , int ( c .config .MaxRetries ) )
81
+ resp , err := httpclient .MakeRequest (c .config .Client , apiURL , c .config .MaxRetries , c . config . Timeout )
82
82
if err != nil {
83
83
return fmt .Errorf ("failed to fetch commoncrawl(%d): %s" , page , err )
84
84
}
@@ -114,7 +114,7 @@ func (c *Client) formatURL(domain string, page uint) string {
114
114
func (c * Client ) getPagination (domain string ) (paginationResult , error ) {
115
115
url := fmt .Sprintf ("%s&showNumPages=true" , c .formatURL (domain , 0 ))
116
116
117
- resp , err := httpclient .MakeRequest (c .config .Client , url , int ( c .config .MaxRetries ) )
117
+ resp , err := httpclient .MakeRequest (c .config .Client , url , c .config .MaxRetries , c . config . Timeout )
118
118
if err != nil {
119
119
return paginationResult {}, err
120
120
}
0 commit comments