mirror of
https://github.com/timberjoegithub/GoogleScrape.git
synced 2026-07-22 00:19:48 +00:00
Adding links to Facebook and cleaning up twitter
This commit is contained in:
@@ -852,7 +852,6 @@ 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
|
||||||
#wpurllist = outputs['postssession'].query(Posts).filter(Posts.name == title).all()
|
|
||||||
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
|
||||||
@@ -872,7 +871,7 @@ def post_to_x2(title, content, date, rating, address, picslist, instasession,out
|
|||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
def post_facebook3(title, content, date, rating, address, picslist, instasession):
|
def post_facebook3(title, content, date, rating, address, picslist, outputs):
|
||||||
"""
|
"""
|
||||||
Post to Facebook3.
|
Post to Facebook3.
|
||||||
|
|
||||||
@@ -897,6 +896,11 @@ def post_facebook3(title, content, date, rating, address, picslist, instasession
|
|||||||
imgs_vid = []
|
imgs_vid = []
|
||||||
imgs_pic = []
|
imgs_pic = []
|
||||||
img_list = pics
|
img_list = pics
|
||||||
|
attrib_list = outputs['postssession'].query(Posts).filter(Posts.name == title).all()
|
||||||
|
business_url = attrib_list[0].businessurl
|
||||||
|
wpurl = attrib_list[0].wpurl
|
||||||
|
status_message = str(title) + ': My Review - '+ wpurl + '\n Business website: '+ \
|
||||||
|
business_url+' \n\n'+ content
|
||||||
for img in img_list:
|
for img in img_list:
|
||||||
if 'montage.mp4' in img:
|
if 'montage.mp4' in img:
|
||||||
imgs_vid.append(img.strip())
|
imgs_vid.append(img.strip())
|
||||||
@@ -904,7 +908,7 @@ def post_facebook3(title, content, date, rating, address, picslist, instasession
|
|||||||
imgs_pic.append(img.strip())
|
imgs_pic.append(img.strip())
|
||||||
if imgs_vid:
|
if imgs_vid:
|
||||||
try:
|
try:
|
||||||
post_id = post_facebook_video(group_id, imgs_vid,auth_token,title, content,
|
post_id = post_facebook_video(group_id, imgs_vid,auth_token,title, status_message,
|
||||||
date, rating, address)
|
date, rating, address)
|
||||||
imgs_id.append(post_id['id'])
|
imgs_id.append(post_id['id'])
|
||||||
except AttributeError as error:
|
except AttributeError as error:
|
||||||
|
|||||||
Reference in New Issue
Block a user