加sleep,例子:
for i in
range(0,len(df
)):
print(i
)
time
.sleep(1) #这里
inputText
=df
.at
[i
,"微博正文"]
print(inputText
)
if(len(inputText
)<2048):
accessToken
= getToken()
everyday_list
.append(last_getProEmotion(inputText
,accessToken
))
else:
data
= cut_text(inputText
, 1500) # 如果文章字节长度大于
1500,则切分
accessToken
= getToken()
everyday_list
.append(last_getProEmotion(data
, accessToken
))
print(everyday_list
)
转载请注明原文地址:https://ipadbbs.8miu.com/read-2655.html