Coder Social home page Coder Social logo

linkcheck's Introduction

URL Checker

Python

This Python script checks the availability of a list of URLs and categorizes them as "working" or "not working."

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/url-checker.git
  2. Navigate to the project directory:

    cd url-checker
  3. Run the script:

    python url_checker.py

Usage

Modify the urls list in the url_checker.py script to include the URLs you want to check.

from urllib.request import urlopen
from urllib.error import *

# List of URLs to check
urls = [
    "http://ebook.pldworld.com/_eBook/FPGA%EF%BC%8FHDL/-Eng-/The%20Complete%20Verilog%20Book%20(Vivek%20Sagdeo).pdf",
    "https://athena.ecs.csus.edu/~arad/csc205/intro_verilog_hdl.pdf",  # This URL should fail
    "https://ia800201.us.archive.org/30/items/springer_10.1007-978-1-4757-6682-0/10.1007-978-1-4757-6682-0.pdf",
]

# Lists to store working and non-working URLs
Poductive_URLS = []
non_Poductive_URLS = []

# Loop through the list of URLs
for url in urls:
    try:
        html = urlopen(url)
    except HTTPError as e:
        non_Poductive_URLS.append(url)
    except URLError as e:
        non_Poductive_URLS.append(url)
    else:
        Poductive_URLS.append(url)

# Print the lists of working and non-working URLs
print("working urls: ", Poductive_URLS)
print("not working urls: ", non_Poductive_URLS)

License

This project is licensed under the MIT License - see the LICENSE file for details.


Replace `"yourusername/url-checker"` in the installation instructions with the actual URL of your GitHub repository.

Don't forget to add a screenshot of your script's output by uploading the image as "script_output.png" into a "screenshots" folder in your repository.

linkcheck's People

Contributors

wareeshaali2003 avatar nomad-dev-saad avatar

Stargazers

 avatar KHADEEJAH ASHRAF avatar  avatar Abdul Samad avatar Maira Usman avatar Hamna Mohiuddin avatar

Watchers

 avatar

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.