mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
feat: set default sleep random strategy if not set
This commit is contained in:
@@ -199,6 +199,14 @@ func (l *LiveCrawler) exitLiveRoom() error {
|
||||
}
|
||||
|
||||
func (dExt *DriverExt) VideoCrawler(configs *VideoCrawlerConfigs) (err error) {
|
||||
// set default sleep random strategy if not set
|
||||
if configs.Feed.SleepRandom == nil {
|
||||
configs.Feed.SleepRandom = []interface{}{1, 5}
|
||||
}
|
||||
if configs.Live.SleepRandom == nil {
|
||||
configs.Live.SleepRandom = []interface{}{10, 15}
|
||||
}
|
||||
|
||||
currVideoStat := &VideoStat{
|
||||
configs: configs,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user