mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +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) {
|
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{
|
currVideoStat := &VideoStat{
|
||||||
configs: configs,
|
configs: configs,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user