python3 implements 12306 to query the remaining tickets

1, Principle of querying the remaining tickets

The normal user's web browser usually enters 12306 official website to query the remaining tickets. You can click to query the starting station, terminal station and date. If you use Python to operate, there are two schemes. One is based on selenium 2 automatic framework control browser implementation, and the other is based on Python's own crawler package such as request, This paper implements the second scheme.