pip install requests

import requests

url = “http://www.example.com”

# Send a GET request to the website
response = requests.get(url)

# Print the status code and content of the response
print(f”Status code: {response.status_code}”)
print(f”Content: {response.content}”)

import requests
import concurrent.futures

url = “http://www.example.com”

# Define a function that sends a GET request to the website
def send_request(url):
return requests.get(url)

# Create a ThreadPoolExecutor with 100 workers
with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:
# Send 1000 requests to the website
for i in range(1000):
future = executor.submit(send_request, url)
# Print the status code of the response
print(f”Sent request {i+1} to {url} (status code: {future.result().status_code})”)