|
import requests
|
|
from random import randint
|
|
import json
|
|
|
|
r = requests.get("http://10.1.1.2:8080/search?q=test&format=json&language=en-US")
|
|
|
|
results = json.loads(r.text)["results"]
|
|
final_content = results[randint(0, len(results))]['content']
|
|
|
|
print(final_content)
|