raannakasturi commited on
Commit
8d39c59
·
1 Parent(s): eb6ef16

Remove API key dependency from image fetching in generate_post_html function

Browse files
Files changed (1) hide show
  1. post_blog.py +1 -2
post_blog.py CHANGED
@@ -11,13 +11,12 @@ client_id = os.getenv('CLIENT_ID')
11
  client_secret = os.getenv('CLIENT_SECRET')
12
  refresh_token = os.getenv('REFRESH_TOKEN')
13
  blog_id = os.getenv('BLOG_ID')
14
- imgbb_api_key = os.getenv('IMGBB_API_KEY')
15
 
16
  def generate_post_html(doi, title, category, summary, mindmap, citation):
17
  doi = doi.split("https://")[-1]
18
  mindmap = mindmap.replace("{", r'{').replace("}", r'}')
19
  citation = mistune.html(repr(citation.replace("&", "&").replace("```plaintext\n", "").replace("\n```", "").strip())[1:-1])
20
- image = fetch_image(title, category, summary, imgbb_api_key)
21
  html_summary = mistune.html(summary)
22
  post = f"""
23
  <div id="paper_post">
 
11
  client_secret = os.getenv('CLIENT_SECRET')
12
  refresh_token = os.getenv('REFRESH_TOKEN')
13
  blog_id = os.getenv('BLOG_ID')
 
14
 
15
  def generate_post_html(doi, title, category, summary, mindmap, citation):
16
  doi = doi.split("https://")[-1]
17
  mindmap = mindmap.replace("{", r'{').replace("}", r'}')
18
  citation = mistune.html(repr(citation.replace("&amp;", "&").replace("```plaintext\n", "").replace("\n```", "").strip())[1:-1])
19
+ image = fetch_image(title, category, summary)
20
  html_summary = mistune.html(summary)
21
  post = f"""
22
  <div id="paper_post">