I have wrote the code which searches for particular keyword and give the news through news API but I have hard coded the q (Keywords or phrases to search for in the article title and body.) But I want it should be dynamic like user give a keyword to search and it provides everything. Can anyone please help me. Below is the code snippet which i am doing.
import requests
url = ('http://newsapi.org/v2/everything?'
'q=Python&'
'from=2020-08-17&'
'sortBy=popularity&'
'apiKey=xxxxxxx')
response = requests.get(url)