Created
June 3, 2020 01:53
-
-
Save JohnDeJesus22/63a8b88344be7f3cda1a3a46c9769c44 to your computer and use it in GitHub Desktop.
article_download_newspaper_library
This file contains 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
# set configuration to not capture images | |
config = Config() | |
config.fetch_images = False | |
# applying article function from newspaper to each link and creating list | |
articles = [Article(url) for url in search_results] | |
# download the articles | |
articles_downloaded = [article.download() for article in articles] | |
# download the articles | |
articles_parsed = [article.parse() for article in articles] | |
# get text from articles | |
article_text = [article.text for article in articles] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment