Skip to content

Instantly share code, notes, and snippets.

@KalebNyquist
Created September 16, 2019 18:11
Show Gist options
  • Save KalebNyquist/7fb374a6cabb1603a96977fbbe3a1d80 to your computer and use it in GitHub Desktop.
Save KalebNyquist/7fb374a6cabb1603a96977fbbe3a1d80 to your computer and use it in GitHub Desktop.
Medium Post Step 6
def convert_authors_to_ids(authors):
author_ids = []
for author in authors:
author_ids.append(author_dict[author])
return author_ids
upload_dict = {
"fields": {
"URL" : article.url,
"Title" : article.title,
"Date" : publish_date(article),
"Author(s)" : article.authors,
"Site Name" : article.meta_data['og']['site_name'],
"Media" : determine_media(article),
"Opinion" : determine_opinion(article),
"Keywords" : article.keywords,
"Site Twitter" : article.meta_data['twitter']['site'],
"Text" : article.text,
},
"typecast" : True
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment