Skip to content

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.

Notifications You must be signed in to change notification settings

waqi786/Web-Scraper-Using-BeautifulSoup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Web-Scraper-Using-BeautifulSoup

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.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages