条件:
女生
身份证校验规则,
根据以上条件,我筛选出来了450条数据,累死我吧。
接下来又聊天,我说可不可以透露一个数字。
现在又增加了筛选条件,只有45条数据。校验一次5块钱,校验不起,
果断选择第二种方案,人工检测,支付宝和12306,首选12306
话不多说,直接上代码。
1 # pip install id_validator 2 from id_validator import validator 3 arr = [] 4 for i in range(1000): 5 num = f"{i:03d}" 6 str = "130533199704115"+num 7 sex = int(num[-2]) 8 if sex%2 == 0: 9 if(validator.is_valid(str)): 10 arr.append(str) 11 12 print(len(arr),arr) 13 with open("D://wangxuewei.txt","w")as f: 14 for i in arr: 15 f.write(i+"\n")
View Code
找出数据,整理成pdf文件,跟房地产老哥说一声,下班去打印,20分钟搞定。
130533199704115004 130533199704115020 130533199704115047 130533199704115063 130533199704115100 130533199704115127 130533199704115143 130533199704115186 130533199704115207 130533199704115223 130533199704115266 130533199704115282 130533199704115303 130533199704115346 130533199704115362 130533199704115389 130533199704115426 130533199704115442 130533199704115469 130533199704115485 130533199704115506 130533199704115522 130533199704115549 130533199704115565 130533199704115581 130533199704115602 130533199704115629 130533199704115645 130533199704115661 130533199704115688 130533199704115709 130533199704115725 130533199704115741 130533199704115768 130533199704115784 130533199704115805 130533199704115821 130533199704115848 130533199704115864 130533199704115880 130533199704115901 130533199704115928 130533199704115944 130533199704115960 130533199704115987
View Code
常用的两个方法:
from id_validator import validator print(validator.is_valid("13053319960601"))#判断身份证是否正确 print(validator.get_info("13053319960601"))#根据身份证获取人的信息