raannakasturi commited on
Commit
38f470f
·
verified ·
1 Parent(s): dfaac2c

Update post_blog.py

Browse files
Files changed (1) hide show
  1. post_blog.py +3 -0
post_blog.py CHANGED
@@ -133,6 +133,9 @@ def post_blog(title, category, summary, mindmap, citation, uaccess_key, wait_tim
133
  if not all([post_title, post_category, post_body, post_image]):
134
  print(f'Failed to create post {post_title}')
135
  return False
 
 
 
136
  status = post_post(post_title, post_category, post_body, post_image)
137
  print(f"Waiting for {wait_time*60} seconds...")
138
  time.sleep(wait_time*60)
 
133
  if not all([post_title, post_category, post_body, post_image]):
134
  print(f'Failed to create post {post_title}')
135
  return False
136
+ post_title = post_title.replace("&", "&")
137
+ if "&" in post_title:
138
+ return False
139
  status = post_post(post_title, post_category, post_body, post_image)
140
  print(f"Waiting for {wait_time*60} seconds...")
141
  time.sleep(wait_time*60)