fixed twitter

This commit is contained in:
Joe Steele
2024-06-14 15:53:10 -04:00
parent c06d35e0e6
commit 0d6aac15f3
+3 -1
View File
@@ -469,7 +469,7 @@ def get_google_data(driver,outputs ):
database_update_row(name,"googleurl",googleurl,"onlyempty",outputs) database_update_row(name,"googleurl",googleurl,"onlyempty",outputs)
database_update_row(name,"place_id",place_id,"onlyempty",outputs) database_update_row(name,"place_id",place_id,"onlyempty",outputs)
database_update_row(name,"googledetails",details,"onlyempty",outputs) database_update_row(name,"googledetails",details,"onlyempty",outputs)
database_update_row(name,"google","1","onlyempty",outputs) database_update_row(name,"google",True,"onlyempty",outputs)
except KeyError as error: except KeyError as error:
print('Error writing business details from google maps : ',error) print('Error writing business details from google maps : ',error)
else: else:
@@ -852,6 +852,7 @@ def post_to_x2(title, content, date, rating, address, picslist, instasession,out
# Message to post along with the video # Message to post along with the video
attrib_list = outputs['postssession'].query(Posts).filter(Posts.name == title).all() attrib_list = outputs['postssession'].query(Posts).filter(Posts.name == title).all()
business_url = attrib_list[0].businessurl business_url = attrib_list[0].businessurl
if business_url:
wpurl = attrib_list[0].wpurl wpurl = attrib_list[0].wpurl
status_message = str(title) + ': My Review - '+ wpurl + '\n Business website: '+ \ status_message = str(title) + ': My Review - '+ wpurl + '\n Business website: '+ \
business_url business_url
@@ -1393,6 +1394,7 @@ def process_reviews(outputs):
if env.web : if env.web :
#if writtento["web"] == 0 : #if writtento["web"] == 0 :
try: try:
if env.forcegoogleupdate:
post_id, post_link = get_wordpress_post_id_and_link(processrow[1].value,outputs['web'] ) post_id, post_link = get_wordpress_post_id_and_link(processrow[1].value,outputs['web'] )
if post_link: if post_link:
database_update_row(processrow[1].value,"wpurl",post_link,"forceall",outputs) database_update_row(processrow[1].value,"wpurl",post_link,"forceall",outputs)