demo_requests_get_params.py:
import requests url = 'https://begtut.com/python/demopage.php' #demonstrate how to use the 'params' parameter: x = requests.get(url, params = {"model": "Mustang"}) #print the response (the content of the requested file): print(x.text) #the file 'demopage.php' looks for a 'model' query string and prints its value.
➜ begtut>python demo_requests_get_params.py
<!DOCTYPE html>
<html>
<body>
<p>You sent me a Mustang</p>
</body>
</html>