Created
September 16, 2019 18:11
-
-
Save KalebNyquist/7fb374a6cabb1603a96977fbbe3a1d80 to your computer and use it in GitHub Desktop.
Medium Post Step 6
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
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