由下水道居民制作,运行后自行设定以x秒间隔获取lexBurner粉丝数量并保存至同目录txt文件下。
import fuckLex,_thread
try:
_thread.start_new_thread(fuckLex.getTextAndWrite, ('fuckLex.txt',)) #获取数据写入fuckLex.txt
_thread.start_new_thread(fuckLex.outPutDecreseStringInterval, ('fuckLex.txt', 60, 'fuckLexOutput.txt',) ) #朴素地分析数据并写入fuckLexOutput.txt
except:
print("Error: 无法启动线程")
while 1:
pass
descrption: get the fans sum and write it into 'fuckLex.txt'
params: String
return: null
import fuckLex
fuckLex.getTextAndWrite('fuckLex.txt')
descrption: get current fans count
Params: null
return: int
import fuckLex
print(fuckLex.get())
descrption: get the decreseSum
Params: String
return: int
import fuckLex
print(fuckLex.calcDecreseSum('fuckLex.txt'))
descrption: get the decrese String
Params: String
return: String
import fuckLex
print(fuckLex.outPutDecreseString('fuckLex.txt'))
-->from Mon Feb 8 11:42:27 2021
to Mon Feb 8 15:08:37 2021
lexBurner fans decresed: 50925
descrption: get the decrese String at certain interval
Params: String, int
return: null
import fuckLex
print(fuckLex.outPutDecreseStringInterval('fuckLex.txt', 60))
descrption: get the decrese String at certain interval and write record into certain file
Params: String, int, String
return: null
import fuckLex
print(fuckLex.outPutDecreseStringInterval('fuckLex.txt', 60, 'fuckLexOutput.txt'))