URL is stored in the text (CSV). You need to test the validity of the URL, parse the IP address and its corresponding physical location, and then append the result to the line of the URL
.
sample data
1,www.qq.com,
2,www.baidu.com,
.
.
.
expected results
1,www.qq.com,,,61.129.7.47,
2,www.baidu.com,,,14.215.177.39,
.
.
.
A novice to python, his own idea is to read URL, in blocks and then check validity and parse IP one by one URL, etc., but this single-mode detection is bound to be crazily slow for 50W + tasks. In addition, I do not have a thorough understanding of multi-process and cooperative process, so I hope to learn multi-process and cooperative process through this example.
the bosses who want to answer leave ideas and code notes!