Last active
February 23, 2022 03:32
-
-
Save DerekHawkins/967c5d6f67e0e4810c5b7565428ccdbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
client = hubspot.Client.create(api_key="hubspot_api_key") | |
for i, s in tqdm(zip(main['id'], main['Schema'])): | |
blog_post = BlogPost(id=i, head_html=s) | |
try: | |
api_response = client.cms.blogs.blog_posts.blog_post_api.update(object_id=i, | |
blog_post=blog_post) | |
pprint(api_response) | |
except ApiException as e: | |
print("Exception when calling blog_posts_api->update: %s\n" % e) | |
sleep(.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment