Joke Collection Website - Blessing messages - How to deal with verification codes when writing a crawler

How to deal with verification codes when writing a crawler

It depends on the type of verification code.

It is a relatively simple verification code composed of numbers and English. There are no distortions, interference lines, or interference points. You can just use image recognition.

More complex ones, with distortions, interference lines, and interference points. One is that you traverse all his verification codes, then manually fill in the corresponding verification codes, and select from the library when needed, but this method is more troublesome. The second is to reverse process the verification code image. By reverse engineering several parameters when generating the verification code, the original verification code image can be obtained by reverse engineering, and then image recognition can be performed

Not now. Few websites use image verification codes or slider verification codes instead. These verification codes mainly test the coordinates or trajectories of mouse clicks. By capturing packets, you can test which values ??are required. You can then pass them on.