From a08d22efc6c85905f8a5def180a7ec93d29085c7 Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Mon, 17 Jun 2024 23:27:22 -0400 Subject: [PATCH] more linting --- social.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/social.py b/social.py index 6f0a182..f4c5098 100644 --- a/social.py +++ b/social.py @@ -1337,8 +1337,8 @@ def post_to_wordpress(title,content,headers,date,rating,address,picslist,local_o print (' ',picname,' was successfully uploaded to website with ID: ',\ file_id, link) try: - linksDict = {'file_id' : file_id , 'link' : link} - linkslist.append(linksDict) + links_dict = {'file_id' : file_id , 'link' : link} + linkslist.append(links_dict) except AttributeError as error: print(" An error adding to dictionary " , file_id , link , " occurred:",\ type(error).__name__) # An error occurred: @@ -1417,6 +1417,16 @@ def post_to_wordpress(title,content,headers,date,rating,address,picslist,local_o ################################################################################################## def process_reviews2(outputs): + """ + Processes reviews data, updates social media platforms, and writes data to files. + + Args: + outputs: Data outputs containing reviews and social media information. + + Returns: + None + """ + # Process webcount = xtwittercount = instagramcount = facebookcount = 0 # webcount=xtwittercount=instagramcount=yelpcount=threadscount=facebookcount=tiktokcount = 0 @@ -1468,7 +1478,7 @@ def process_reviews2(outputs): if env.datasource == 'db': write_to_database(webdata, outputs) else: - write_to_xlsx2(webdata, outputs) + write_to_xlsx2(webdata, outputs) driver.close() # outputs['data'].save(xls) print('Done getting google reviews and writing them to xls file !')