This file provides an overview of the structure of the repository and a brief description of each file.
-
README.md: This file provides a brief description of the repository and instructions on how to run the Python script in main.py. It also contains information about the purpose of the repository, which is to demonstrate a simple web scraping example using the
requests
library in Python. -
main.py: This is the main script of the repository. It contains a simple Python script that fetches and prints the content of a website using the
requests
library. The script defines a functionfetch_website_content(url)
that sends a GET request to the provided URL and returns the response text if the status code is 200. The script then calls this function with a sample URL and prints the first 500 characters of the fetched content.