File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ def directmsg():
18
18
for i in range (num ):
19
19
id = xml [i ][0 ].text
20
20
msg = xml [i ][1 ].text
21
+ if not msg :
22
+ continue
21
23
logbook .info (msg .encode ("utf8" ))
22
24
sendtext (msg .encode ("utf8" ))
23
25
code = api .post ('direct_messages/destroy' , id = id )
@@ -29,9 +31,11 @@ def sendtext(content):
29
31
xml = api .get ('account/rate_limit_status' )
30
32
xml = etree .fromstring (xml )
31
33
limit_num = xml [1 ].text
34
+ logbook .info (limit_num )
32
35
if int (limit_num ) == 0 :
33
36
return
34
37
code = api .post ('statuses/update' ,status = content )
38
+ logbook .info (content )
35
39
logbook .info ("sent!" )
36
40
37
41
if __name__ == '__main__' :
@@ -48,4 +52,4 @@ def sendtext(content):
48
52
49
53
while True :
50
54
directmsg ()
51
- time .sleep (60 )
55
+ time .sleep (10 )
You can’t perform that action at this time.
0 commit comments