Skip to content

Commit

Permalink
Added printing for post_responses on verbose mode
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Sep 14, 2020
1 parent ffff709 commit ab94b50
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions yafot-facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def main():
post_response = bot.make_post()

post_id = post_response["post_id"] # Get the post-id from json response
if config.verbose:
print(f"Post response: {post_response}")

if config.cdir:
# Ask the bot to comment under the post
Expand All @@ -83,6 +85,8 @@ def main():
comment_response = bot.make_comment(post_id)

comment_id = comment_response["id"] # Get the comment-id from json response
if config.verbose:
print(f"Comment response: {comment_response}")

if config.palbum_id:
# Ask the bot to add the photo-frame in album
Expand All @@ -94,6 +98,8 @@ def main():
palbum_response = bot.make_album_post(post_id, config.palbum_id, "p")

palbum_id = palbum_response["post_id"] # Get the photo-album-post-id from json response
if config.verbose:
print(f"Post-album response: {palbum_response}")

if config.calbum_id:
# Ask the bot to add the comment-frame in album
Expand All @@ -105,9 +111,12 @@ def main():
calbum_response = bot.make_album_post(comment_id, config.calbum_id, "c")

calbum_id = calbum_response["post_id"] # Get the comment-album-post-id from json response
if config.verbose:
print(f"Comment-album response: {calbum_response}")

# Log the id's of the posts
logger.log_posts(curren_frame, post_id, comment_id, palbum_id, calbum_id)
print(f"Done posting frame-number {curren_frame}")

# Wait for some time before going into the next loop
if config.verbose:
Expand Down

0 comments on commit ab94b50

Please sign in to comment.