Code Monkey home page Code Monkey logo

url_redirect_checker's Introduction

URL Redirect Checker

This script checks if a list of URLs redirect correctly to the expected URLs. It reads the URLs from an Excel file and checks if each URL redirects to the corresponding expected URL.

Usage

  1. Create an Excel file containing the URLs to be checked. The file should contain a single column with the URLs.
  2. Create another Excel file, sheet, or column containing the expected redirect URLs. The file should contain a single column with the expected redirect URLs.
  3. Create a Python virtual environment and activate it:
python -m venv .venv
source .venv/Scripts/activate
  1. Install the required packages:
pip install -r requirements.txt
  1. Run the script with the following command:
python url_redirect_checker.py <original_file_path> <original_sheet_name> <original_column_index> <redirect_file_path> <redirect_sheet_name> <redirect_column_index>

Explanation of the arguments:

  • <original_file_path>: The path to the Excel file containing the URLs to be checked.
  • <original_sheet_name>: The name of the sheet in the Excel file containing the URLs to be checked.
  • <original_column_index>: The index of the column containing the URLs to be checked.
  • <redirect_file_path>: The path to the Excel file containing the expected redirect URLs.
  • <redirect_sheet_name>: The name of the sheet in the Excel file containing the expected redirect URLs.
  • <redirect_column_index>: The index of the column containing the expected redirect URLs.

Example

python url_redirect_checker.py urls.xlsx Sheet1 1 redirect_urls.xlsx Sheet1 2

url_redirect_checker's People

Contributors

a-tsagkalidis 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.