Overview:
This repository contains a Python script for web scraping using the BeautifulSoup library. The script retrieves the content of a specified URL, extracts all the hyperlinks and paragraphs, and prints them to the console. This simple yet powerful script can be adapted to scrape various types of web content based on user requirements.
✨ Features:
🔗 Link Extraction: Extracts and prints all hyperlinks ( tags) from the specified webpage. 📝 Paragraph Extraction: Extracts and prints all paragraphs (
tags) from the specified webpage. 🌐 HTTP Request Handling: Handles HTTP requests and checks the status of the response to ensure successful retrieval of the webpage content.
🚀 Usage:
Clone this repository to your local machine using the command: git clone https://github.com/waqi786/Web-Scraper-Using-BeautifulSoup.git
Navigate to the directory containing the script.
Ensure you have the required libraries installed by running: pip install beautifulsoup4 requests
Replace the url variable in the script with the target URL you want to scrape.
Run the script using Python 3.x.
💡 Example:
Replace the url variable in the script with your target URL: url = 'https://example.com' # Replace with your target URL Running the script will output all the hyperlinks and paragraphs found on the specified webpage.
📋 Requirements:
Python 3.x BeautifulSoup4 Requests
👤 Author:
waqi786
Uploaded on 2024-07-15.