Error while posting to story, does not work anymore.
N07070 opened this issue · comments
------ commented
Hello !
My bot doesn't work anymore; it can't post shit to her story. When trying to, it outputs a 202 None.
Full log :
[2015-03-17 19:54:30,729] "POST /bq/updates HTTP/1.1" 200 None
[2015-03-17 19:54:30,739] Starting new HTTPS connection (1): feelinsonice-hrd.appspot.com
[2015-03-17 19:54:30,943] "POST /bq/blob HTTP/1.1" 200 48496
[2015-03-17 19:54:31,054] Starting new HTTPS connection (1): feelinsonice-hrd.appspot.com
[2015-03-17 19:54:31,276] "POST /bq/update_snaps HTTP/1.1" 200 0
[2015-03-17 19:54:31,285] [FbStoryBot-176b] Saved the snap.
[2015-03-17 19:54:31,353] Starting new HTTPS connection (1): feelinsonice-hrd.appspot.com
[2015-03-17 19:54:32,465] "POST /bq/upload HTTP/1.1" 200 0
[2015-03-17 19:54:32,470] Starting new HTTPS connection (1): feelinsonice-hrd.appspot.com
[2015-03-17 19:54:32,854] "POST /bq/post_story HTTP/1.1" 202 None
[2015-03-17 19:54:32,857] [FbStoryBot-176b] None
[2015-03-17 19:54:32,858] [FbStoryBot-176b] Posted the snap in the story !
[2015-03-17 19:54:32,864] Starting new HTTPS connection (1): feelinsonice-hrd.appspot.com
[2015-03-17 19:54:33,079] "POST /bq/updates HTTP/1.1" 200 None
[2015-03-17 19:54:48,102] [FbStoryBot-176b] Querying for new snaps...
Full code :
def on_snap(self, sender, snap):
# Sauvegarde temporaire du snap
if snap.media_type == 0:
snap.save("temporaire.jpg")
self.log("Saved the snap.")
elif snap.media_type == 1 or snap.media_type == 2:
snap.save("temporaire.mp4")
self.log("Saved the snap.")
else:
self.log("I do not know which type of snap I got !")
# If the snap is an image
if snap.media_type == 0:
os.system('convert temporaire.jpg -fill \'#FFF5EE\' -pointsize 20 -annotate +0+20 "'+str(sender)+'" image.jpg')
try:
self.log(self.post_story(Snap.from_file('image.jpg')))
try:
if sender != args.username:
self.send_snap(sender, Snap.from_file('resources/recu.png'))
self.log("Validated the reception !")
except:
pass
self.log("Posted the snap in the story !")
except:
self.send_snap(sender, Snap.from_file('resources/erreur.png'))
self.log("Error while trying to post the snap !")
pass
os.system('rm image.jpg temporaire.jpg')
Thanks ! 😄