I am passing URLs to a filtering service. The json body I post is:
body = {
"url-filter": [
"www.reddit.com",
"www.cnn.com",
"www.espn.com"
]
}
I would like to create a function that will allow me to pass one or more URLs to filter. What is unclear to me is:
1) How I should pass these URLs to a function - Python list? The URLs do not need to retain order/sequence.
2) How I should insert the URLs into this json body?
Is there a function that will do this or is something more required?