Code Monkey home page Code Monkey logo

lylacoding / website-subpage-scraper Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 17 KB

This Python script scrapes internal links on a webpage. It prompts for a URL, sends a GET request to retrieve HTML, uses BeautifulSoup to parse and filter links. Then it prompts the user for output mode (terminal or file) to either print or write the links. Installs required modules (requests and beautifulsoup4) if not found.

Python 100.00%
data-extraction hacking hacking-tool html-parsing python python-hacking web-scraping

website-subpage-scraper's Introduction

Website Subpage Scraper

Window View Version

A simplified app version of the script is also available for users who prefer a more user-friendly experience.

Description

Website Subpage Scraper is a Python script designed to scrape all internal links on a webpage. The script prompts the user for a URL, sends a GET request to retrieve the HTML content, and then parses the HTML using the BeautifulSoup module. The script filters out external links and duplicates, and prompts the user to select an output mode, which can either print the list of links to the terminal or write them to a file. In case the required modules (requests and beautifulsoup4) are not already installed, the script will install them automatically.

Usage

To run this script, you must have Python installed on your computer. Open a terminal and navigate to the directory where the script is saved. Then, enter the command "python website-subpage-scraper.py". The script will prompt you for a URL to scrape (make sure to include the http/https part of the URL), and then ask whether you want to print the links to the terminal or save them to a file. The output will be displayed on the terminal or saved to a file named "output.txt".

Disclaimer

Please note that this tool should only be used on websites that you have permission to access. While it may not work on certain larger websites, it should work well on smaller sites such as blogs. The creator of this tool accepts no responsibility for any trouble you may encounter while using it.

website-subpage-scraper's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dannythehacker

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.