Question regarding to python api get_news_headlines() gramma

Hi all,

I am trying to use get_news_headlines() to extract news relating to keyword "nord stream" in python which has the same result in News monitor (below)微信截图-20211129144323.png

I have tried those two ways which I found potential solutions in this Forum, however the first one gave a wrong result (the result is the same if I enter Nordic States AND Streaming Media in News monitor); the second one threw a JOSON error in python.

ek.get_news_headlines("""nord stream""")

ek.get_news_headlines("\\\"nord stream\\\"")


So how to get the correct result in python? How to use get_news_headlines() function to extract the same result as News monitor if I enter an individual KEYWORDS?


Thanks in advance :)

Tagged:

Best Answer

Answers