colly icon indicating copy to clipboard operation
colly copied to clipboard

How to stop and not go down in multiple OnResponse?

Open lovemianhuatang opened this issue 3 years ago • 3 comments

I wrote multiple OnResponse. Let’s say there are five. The previous one is used for judgment. If I want to retry in the third OnResponse, how can I prevent the next two OnResponse from executing?

lovemianhuatang avatar Aug 14 '21 14:08 lovemianhuatang

Well, I think you could put some flag into Response.Ctx.

WGH- avatar Aug 14 '21 17:08 WGH-

In this way, each OnResponse needs to be judged, including the following OnHTML and OnXML, which is not a good choice. @WGH-

lovemianhuatang avatar Aug 15 '21 01:08 lovemianhuatang

image

lovemianhuatang avatar Aug 15 '21 01:08 lovemianhuatang