File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,6 +119,16 @@ print(response['headers']['pc_status'])
119119
120120If you have questions or need help using the library, please open an issue or [ contact us] ( https://proxycrawl.com/contact ) .
121121
122+ ## Custom timeout
123+
124+ If you need to use a custom timeout, you can pass it to the class instance creation like the following:
125+
126+ ``` python
127+ api = ProxyCrawlAPI({ ' token' : ' TOKEN' , ' timeout' : 120 })
128+ ```
129+
130+ Timeout is in seconds.
131+
122132---
123133
124134Copyright 2020 ProxyCrawl
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ class ProxyCrawlAPI:
3737 def __init__ (self , options ):
3838 if options ['token' ] is None or options ['token' ] == '' :
3939 raise Exception ('You need to specify the token' )
40+ if 'timeout' in options :
41+ self .timeout = options ['timeout' ]
4042 self .options = options
4143 self .endPointUrl = PROXYCRAWL_API_URL + '?token=' + options ['token' ]
4244
You can’t perform that action at this time.
0 commit comments