我一直收到这个错误:
tweepy.error.TweepError: [{u'message': u'Status is a duplicate.', u'code': 187
Run Code Online (Sandbox Code Playgroud)
我不知道为什么我得到这个错误我已经尝试了一切!
我的主要代码是:
import socket
from urllib2 import urlopen, URLError, HTTPError
socket.setdefaulttimeout( 23 ) # timeout in seconds
url = 'http://google.co.uk'
try :
response = urlopen( url )
except HTTPError, e:
tweet_text = "Raspberry Pi Server is DOWN!"
textfile = open('/root/Documents/server_check.txt','w')
textfile.write("down")
textfile.close()
except URLError, e:
tweet_text = "Raspberry Pi Server is DOWN!"
textfile = open('/root/Documents/server_check.txt','w')
textfile.write("down")
textfile.close()
else :
textfile = open('/root/Documents/server_check.txt','r')
if 'down' in open('/root/Documents/server_check.txt').read():
tweet_text = "Raspberry Pi Server …Run Code Online (Sandbox Code Playgroud)