qinglong_auto_tools/ck_auto_select.py
spiritysdx e58978c0f3 init
2022-03-08 17:52:00 +08:00

46 lines
1.0 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding:utf-8 -*-
# 作者仓库:https://jihulab.com/spiritlhl/qinglong_auto_tools.git
# 多ck去重每10个隔一行输出ck格式
#ck1&ck2&ck3&……
#作者仓库:https://github.com/spiritLHL/qinglong_auto_tools
#觉得不错麻烦点个star谢谢
# 频道https://t.me/qinglong_auto_tools
#代码
import re
data1 = ''
data2 = ''
#data3 = ''
#data4 = ''
temp1 = data1.split('&')
temp2 = data2.split('&')
#temp3 = data3.split('&')
#temp4 = data4.split('&')
temp = temp1 + temp2
#temp = temp1 + temp2 + temp3 + temp4
temp = list(set(temp))
pin = []
for i in temp:
tp = re.finditer("pt_pin=",i)
for j in tp:
t = j.span()[1]
pin.append(i[t:-1])
pin = list(set(pin))
result = []
for i in temp:
tp = re.finditer("pt_pin=",i)
for j in tp:
t = j.span()[1]
if (i[t:-1]) in pin:
result.append(i)
pin.remove(i[t:-1])
print('ck总计{}'.format(len(result)))
cout = 0
for i in result:
print(i)
cout+=1
if cout%10 == 0:
print(' ')