twitter working now (although it skips invalid

This commit is contained in:
Joe Steele
2024-06-14 16:23:08 -04:00
parent 0d6aac15f3
commit 7f25a9de4d
+3 -1
View File
@@ -279,7 +279,7 @@ def get_hastags(address, name, hashtype):
ziptag = "#"+zip_code
if statetag == 'FL':
statetag += ' #Florida'
fulltag = defaulttags+" "+citytag+" "+statetag+" "+ziptag
fulltag = defaulttags+" "+citytag+" "+statetag+" "+ziptag+" "
# 153 Sugar Belle Dr, Winter Garden, FL 34787
# inphotos[0].rsplit(r'/', 1)
return (fulltag)
@@ -865,6 +865,7 @@ def post_to_x2(title, content, date, rating, address, picslist, instasession,out
client_v2.create_tweet(text=status_message_short, media_ids=[media.media_id])
else:
print ('Problem uploading video to twitter: ',media.processing_info['error'])
return False
except AttributeError as error:
print("AttributeError An error occurred:",error) # An error occurred:
time.sleep(env.facebooksleep)
@@ -914,6 +915,7 @@ def post_facebook3(title, content, date, rating, address, picslist, outputs):
imgs_id.append(post_id['id'])
except AttributeError as error:
print(" An error occurred:",error)
return False
time.sleep(env.facebooksleep)
print(' Facebook response: ',post_id)
return (True)