Question: Collecting news articles with Newspaper, a Python3 library for article scraping and curation. Link to Github code and documentation: https://github.com/codelucasewspaper The goal is to collect

Collecting news articles with Newspaper, a Python3 library for article scraping and curation. Link to Github code and documentation: https://github.com/codelucasewspaper The goal is to collect 50 news articles from https://www.cnn.come Write the results to a JSON file. The required information per news article include the title of the article, the published date, the text/content of the article, and the link to the article. Submission: submit source code and the JSON file that stores the 50 news articles collected from CNN.com. Hint: not all of the links from the newspaper.build) results are valid urls. You may want to use try and except https://www.w3schools.com/python/python try_except.asp ) to catch the invalid urls so that your program doesn't stop running because of that. If you need help on writing a dictionary/array to json, refer to this post on StackOverflow: https://stackoverflow.com/questions/12309269/how-do-i-write-json-data-to-a-file e Collecting news articles with Newspaper, a Python3 library for article scraping and curation. Link to Github code and documentation: https://github.com/codelucasewspaper The goal is to collect 50 news articles from https://www.cnn.come Write the results to a JSON file. The required information per news article include the title of the article, the published date, the text/content of the article, and the link to the article. Submission: submit source code and the JSON file that stores the 50 news articles collected from CNN.com. Hint: not all of the links from the newspaper.build) results are valid urls. You may want to use try and except https://www.w3schools.com/python/python try_except.asp ) to catch the invalid urls so that your program doesn't stop running because of that. If you need help on writing a dictionary/array to json, refer to this post on StackOverflow: https://stackoverflow.com/questions/12309269/how-do-i-write-json-data-to-a-file e
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
