I am currently running a Python program that makes use of the get_news_headlines(). I have been using it for a while and almost always managed to collect news articles correctly. I ran my code today to collect news created this weekend and got an error. I believe the error regards a news article that is of HTML format and for some reason cannot be collected. This issue caused the whole program to halt, which is problematic considering I need to eventually start collecting real-time data. Is there a way this issue could be fixed please, by for example, skipping such news articles of invalid format?
The error is as follows: