I used Delphi to write a two-color ball calculator, which was destroyed along with the hard disk. However, at that time, the lottery data had to be manually input, which was troublesome.
In this case, rewrite it in Python to automatically obtain the latest prize information. In terms of data, there is no more timely and accurate than the official website. So I analyzed the page of the dual-color ball of the CCN network and found that the data can be obtained in JS. See the following:
The simplest way is to read the file and use regular expressions to match and select the required data. It took a while to write a simple version,CodeSee:
For details about the aa.txt file, see:
Basic functions are implemented. Of course, with the revision of CCN, data acquisition will certainly be affected and the changes will be needed. Wait for the time to complete.